note 124860 deleted from function.pi by cmb
| From: | cmb@php.net | Date: | Fri, 27 Mar 2020 22:01:48 +0000 |
| Subject: | note 124860 deleted from function.pi by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-214385@lists.php.net to get a copy of this message | ||
Note Submitter: divinity76 at gmail dot com
----
the documentation is wrong, pi()'s return value has nothing to do with the
precision ini-setting, at least on 64bit amd64 php 7.3.7, pi() always return
3.141592653589793115997963468544185161590576171875 , no matter what the precision is set to.
you can easily test this yourself with:
<?php
ini_set("precision","2");
$answer=3.141592653589793115997963468544185161590576171875;
var_dump(
pi() === $answer,
number_format(pi(),99,".","")
);
?>