Annotation of embedaddon/php/ext/standard/tests/math/bug24142.phpt, revision 1.1.1.2
1.1 misho 1: --TEST--
2: Bug #24142 (round() problems)
3: --FILE--
1.1.1.2 ! misho 4: <?php // $Id$ vim600:syn=php
1.1 misho 5: $v = 0.005;
6: for ($i = 1; $i < 10; $i++) {
7: echo "round({$v}, 2) -> ".round($v, 2)."\n";
8: $v += 0.01;
9: }
10: ?>
11: --EXPECT--
12: round(0.005, 2) -> 0.01
13: round(0.015, 2) -> 0.02
14: round(0.025, 2) -> 0.03
15: round(0.035, 2) -> 0.04
16: round(0.045, 2) -> 0.05
17: round(0.055, 2) -> 0.06
18: round(0.065, 2) -> 0.07
19: round(0.075, 2) -> 0.08
20: round(0.085, 2) -> 0.09
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>