RE: [PHP] round()
| From: | tedd | Date: | Sat, 13 Oct 2007 03:26:12 +0000 |
| Subject: | RE: [PHP] round() | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-263172@lists.php.net to get a copy of this message | ||
At 12:55 PM -0700 10/12/07, Instruct ICC wrote:
Never mind. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.comphp -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.Yes, but precision is not the issue.