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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 08:01:28 2024 UTC