RE: round()

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

 



> > > 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.

_________________________________________________________________
Help yourself to FREE treats served up daily at the Messenger Café. Stop by today.
http://www.cafemessenger.com/info/info_sweetstuff2.html?ocid=TXT_TAGLM_OctWLtagline

[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