|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51478 Unexpected result for tan(M_PI_2)
Submitted: 2010-04-05 14:49 UTC Modified: 2010-04-05 16:05 UTC
From: rik dot veenboer at gmail dot com Assigned:
Status: Not a bug Package: Math related
PHP Version: 5.3.2 OS: Windows 7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: rik dot veenboer at gmail dot com
New email:
PHP Version: OS:


 [2010-04-05 14:49 UTC] rik dot veenboer at gmail dot com
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:

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-04-05 15:46 UTC]
-Status: Open +Status: Bogus
 [2010-04-05 15:46 UTC]
Please read again the tangent properties (and PI).
 [2010-04-05 16:05 UTC] rik dot veenboer at gmail dot com
I confused the sin() and the tan() functions. Now is see that tan(M_PI_2) should go to infinity. This bug can be removed.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 22 08:01:29 2024 UTC