Bug #70568 [NEW]: atan2 returns NAN
| From: | goodnickoff at gmail dot com | Date: | Thu, 24 Sep 2015 08:59:32 +0000 |
| Subject: | Bug #70568 [NEW]: atan2 returns NAN | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-196197@lists.php.net to get a copy of this message | ||
From: goodnickoff at gmail dot com
Operating system: All
PHP version: 5.6.13
Package: Math related
Bug Type: Bug
Bug description:atan2 returns NAN
Description:
------------
If both parameters are INF or -INF sometimes atan2 function returns NAN
but sometimes -2.3561944901923.
results on different versions of PHP and OS:
-2.3561944901923%
PHP 5.5.27 (cli) (built: Jul 23 2015 00:21:59)
macos 64bit
NAN
PHP 5.4.39 (cli) (built: Mar 19 2015 22:16:19)
Thread Safety enabled
Windows NT 6.1 build 7601 (Windows 7 Business Edition Service Pack 1)
i586 x86
-2.3561944901923
PHP Version 5.5.21 Build Date Jan 21 2015 14:38:49
Thread Safety enabled
Windows NT CZC4433C6H-HP 6.1 build 7601 (Windows 7 Business Edition
Service Pack 1) AMD64
NAN
PHP 5.6.11 (cli) (built: Jul 9 2015 20:55:40) x86
Thread Safety enabled
Windows NT 10.0; Win64; x64 (Build 10240)
Test script:
---------------
php -r 'echo atan2(-INF, -INF);'
Expected result:
----------------
-2.3561944901923
Actual result:
--------------
NAN
--
Edit bug report at https://bugs.php.net/bug.php?id=70568&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70568&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70568&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70568&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=70568&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=70568&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=70568&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=70568&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=70568&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=70568&r=support
Expected behavior: https://bugs.php.net/fix.php?id=70568&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=70568&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=70568&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=70568&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70568&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=70568&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=70568&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=70568&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=70568&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=70568&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=70568&r=mysqlcfg