Reply to Re: Stop PHP 5 from Rounding

Your name:

Reply:


Posted by tim on 05/29/06 06:57

lorento wrote:
> >From the php manual :
> The returned float has a precision based on the precision directive in
> php.ini, which defaults to 14.
>

The precision setting alters the number of digits displayed in echo
statements but it does not affect the precision of floating points
calculations.

>From the manual
http://www.php.net/manual/en/language.types.float.php
The size of a float is platform-dependent, although a maximum of
~1.8e308 with a precision of roughly 14 decimal digits is a common
value (that's 64 bit IEEE format).

For higher accuracy a software math library is needed. Bcmath does
this, slowly...

Regards

Tim

[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

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