Annotation of embedaddon/php/ext/standard/tests/math/bug24142.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Bug #24142 (round() problems)
                      3: --FILE--
                      4: <?php // $Id: bug24142.phpt 242949 2007-09-26 15:44:16Z cvs2svn $ vim600:syn=php
                      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>