Reply to Re: Changing precision level of floating point variables

Your name:

Reply:


Posted by Matthew on 01/14/08 18:03

ZeldorBlat emailed this:
> On Jan 14, 12:40 pm, Matthew <matt...@spamkiller.com> wrote:
>> Hi,
>>
>> I want to change the precision level of floating point variables and
>> calculations which is done in php.ini.
>>
>> However the server I rent for my domain does not give me access to
>> php.ini, they say 'for security reasons'.
>>
>> Can the precision level be changed by PHP code as needed?
>>
>> Thanks and regards, etc..
>
> According to this manual page:
>
> <http://www.php.net/manual/en/ini.php>
>
> the "precision" directive is changeable PHP_INI_ALL which, according
> to that same page, means that the "entry can be set anywhere"
> including ini_set():
>
> <http://www.php.net/ini_set>

Thanks.

I've just noticed that the manual says:

"precision integer: The number of significant digits displayed in floating
point numbers."

'Displayed' being the significant word - does this mean setting the
precision to 30 (my system defaults to 12) will not increase the accuracy
of my floating point calculations and will change only what will be
displayed if I output the value?

I want to use pi to 30 decimal places, php's pi has a max of 20, for some
complex long/lat calculations.

Thanks.

[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

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