<?php const EPSILON = 1e-8; $value = 4234568424.7199998; $rounded = round($value, 2); if (abs($rounded-$value) < EPSILON) { echo $rounded; } else { echo $value; }
You have javascript disabled. You will not be able to edit any code.