File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
standard /
tests /
math /
bug24142.phpt
Revision
1.1.1.2 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue May 29 12:34:45 2012 UTC (12 years, 3 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
HEAD
php 5.4.3+patches
--TEST--
Bug #24142 (round() problems)
--FILE--
<?php // $Id: bug24142.phpt,v 1.1.1.2 2012/05/29 12:34:45 misho Exp $ vim600:syn=php
$v = 0.005;
for ($i = 1; $i < 10; $i++) {
echo "round({$v}, 2) -> ".round($v, 2)."\n";
$v += 0.01;
}
?>
--EXPECT--
round(0.005, 2) -> 0.01
round(0.015, 2) -> 0.02
round(0.025, 2) -> 0.03
round(0.035, 2) -> 0.04
round(0.045, 2) -> 0.05
round(0.055, 2) -> 0.06
round(0.065, 2) -> 0.07
round(0.075, 2) -> 0.08
round(0.085, 2) -> 0.09
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>