Reply to Re: Missing 0.0000001 - driving me crazy - help!

Your name:

Reply:


Posted by Ian B on 12/05/05 14:25

round() converts the result of whatever is between the parentheses to a
float and rounds that up to whatever number of decimals you want, so
you start getting problems around the 15th decimal.

The bcmath functions work on strings to whatever degree of accuracy you
ask for and will never produce errors.

So basically if you round up to fewer than, say ten decimals, ordinary
maths functions are fine, but more than that, use bcmath.

Of course, with ints you just get ints back.

Ian

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация