-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed as not planned
Labels
Description
Description
The following code:
<?php
$numerator = 7380;
$denominator = 28800;
$precision = 2;
$result = round(($numerator / $denominator) * 100, $precision);
echo $result;
Resulted in this output:
25.62
But I expected this output instead:
25.63
Without round we get 25.625, so after round it must be 25.63
PHP Version
PHP 8.4.2
Operating System
No response