[PHP-BUG] Bug #51478 [NEW]: Unexpected result for tan(M_PI_2)

[email protected] ("rik dot veenboer at gmail dot com") Mon, 5 Apr 2010 14:49:50 +0200 (CEST)
Newsgroups php.bugs
Message-ID <[email protected]>
From:             
Operating system: Windows 7
PHP version:      5.3.2
Package:          Math related
Bug Type:         Bug
Bug description:Unexpected result for tan(M_PI_2)

Description:
------------
When running the code, the return value is a float: 1.6331239353195E+16,
while a value of 1 is expected. This was posted before as bug #31236, but
not fixed since 2004.

Test script:
---------------
tan(M_PI_2)

Expected result:
----------------
1

Actual result:
--------------
1.6331239353195E+16

-- 
Edit bug report at http://bugs.php.net/bug.php?id=51478&edit=1
-- 
Try a snapshot (PHP 5.2):            http://bugs.php.net/fix.php?id=51478&r=trysnapshot52
Try a snapshot (PHP 5.3):            http://bugs.php.net/fix.php?id=51478&r=trysnapshot53
Try a snapshot (PHP 6.0):            http://bugs.php.net/fix.php?id=51478&r=trysnapshot60
Fixed in SVN:                        http://bugs.php.net/fix.php?id=51478&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51478&r=needdocs
Fixed in release:                    http://bugs.php.net/fix.php?id=51478&r=alreadyfixed
Need backtrace:                      http://bugs.php.net/fix.php?id=51478&r=needtrace
Need Reproduce Script:               http://bugs.php.net/fix.php?id=51478&r=needscript
Try newer version:                   http://bugs.php.net/fix.php?id=51478&r=oldversion
Not developer issue:                 http://bugs.php.net/fix.php?id=51478&r=support
Expected behavior:                   http://bugs.php.net/fix.php?id=51478&r=notwrong
Not enough info:                     http://bugs.php.net/fix.php?id=51478&r=notenoughinfo
Submitted twice:                     http://bugs.php.net/fix.php?id=51478&r=submittedtwice
register_globals:                    http://bugs.php.net/fix.php?id=51478&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=51478&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=51478&r=dst
IIS Stability:                       http://bugs.php.net/fix.php?id=51478&r=isapi
Install GNU Sed:                     http://bugs.php.net/fix.php?id=51478&r=gnused
Floating point limitations:          http://bugs.php.net/fix.php?id=51478&r=float
No Zend Extensions:                  http://bugs.php.net/fix.php?id=51478&r=nozend
MySQL Configuration Error:           http://bugs.php.net/fix.php?id=51478&r=mysqlcfg