php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14756 pow(0,[broken power]) gives wrong result
Submitted: 2001-12-29 14:49 UTC Modified: 2002-01-10 17:20 UTC
From: php at mouken dot com Assigned:
Status: Closed Package: Math related
PHP Version: 4.1.1 OS: Linux (Debian 2.2)
Private report: No CVE-ID: None
 [2001-12-29 14:49 UTC] php at mouken dot com
The pow() function returns incorrect results when raising zero to a "broken power".

pow(0,0.5) ("the square root of zero"), for example, returns NAN. It should return zero.

This, is new since 4.0.6. Perhaps it is related to the fix for bug #14544.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-10 13:31 UTC] php at mouken dot com
pow() returns incorrect results when raising zero to a "broken power".

Example:
pow(0,0.5) ("the square root of zero") returns NAN. It should return zero.

This was introduced sometime after 4.0.6. Perhaps it is related to the fix for bug #14544.
 [2002-01-10 17:20 UTC] derick@php.net
This is fixed in CVS already

Derick
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Oct 30 22:01:28 2024 UTC