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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
41 + 30 = ?
Subscribe to this entry?

 
 [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 Mar 28 17:01:29 2024 UTC