php-src/Zend/tests/float_prec_001.phpt
Christian Seiler 04c528609a - MFH: Changed floating point behaviour to consistently use double precision
on all platforms and with all compilers.
2008-12-02 16:19:10 +00:00

11 lines
229 B
PHP

--TEST--
Double precision is used for floating point calculations
--FILE--
<?php
var_dump (0.002877 == 2877.0 / 1000000.0);
var_dump (substr (sprintf ("%.35f", 0.002877), 0, 10));
?>
--EXPECT--
bool(true)
string(10) "0.00287699"