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
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: php at mouken dot com
New email:
PHP Version: OS:

 

 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2021 The PHP Group
All rights reserved.
Last updated: Fri Dec 03 08:03:33 2021 UTC