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