RE: round()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 12:55 PM -0700 10/12/07, Instruct ICC wrote:
 > > > Yes, but precision is not the issue.
 > >
php -r '$t=123.45; echo $t . "\n"; $t+=0.00000000001; echo $t . "\n";'
123.45
123.45000000001
php -r '$t=123.45; echo $t . "\n"; $t+=0.000000000001; echo $t . "\n";'
123.45
123.45

php -r '$t=123.45678901234567; echo $t . "\n";'
123.45678901235

Geee garbage in, garbage out.
round would have been given garbage to process depending upon the precision desired.

Anyway, you can still believe what you want.  I see others agree.


Never mind.

Cheers,

tedd
--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux