note 119504 added to math.constants
| From: | pemapmodder1970 at gmail dot com | Date: | Thu, 23 Jun 2016 15:33:20 +0000 |
| Subject: | note 119504 added to math.constants | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-205801@lists.php.net to get a copy of this message | ||
Although INF can be used for comparison against normal numbers and as a directed number, and behaves
as reciprocal of zero, it is not like limit INF tends to infinity. These operations do not work:
<?php
var_dump(INF / INF); // float(NAN)
var_dump(INF - INF); // float(NAN)
?>
However, it works with arc-tangent:
<?php
var_dump(atan(INF) / M_PI); // float(0.5)
var_dump(atan2(INF, INF) / M_PI); // float(0.25)
var_dump(atan2(1, INF) / M_PI); // float(0)
?>
----
Server IP: 72.52.91.14
Probable Submitter: 14.199.240.179
----
Manual Page -- http://php.net/manual/en/math.constants.php
Edit -- https://master.php.net/note/edit/119504
Del: integrated -- https://master.php.net/note/delete/119504/integrated
Del: useless -- https://master.php.net/note/delete/119504/useless
Del: bad code -- https://master.php.net/note/delete/119504/bad+code
Del: spam -- https://master.php.net/note/delete/119504/spam
Del: non-english -- https://master.php.net/note/delete/119504/non-english
Del: in docs -- https://master.php.net/note/delete/119504/in+docs
Del: other reasons-- https://master.php.net/note/delete/119504
Reject -- https://master.php.net/note/reject/119504
Search -- https://master.php.net/manage/user-notes.php