Doc #66288 [Opn->Nab]: pow() gives unexpected results if exponent is negative
| From: | aharvey@php.net | Date: | Fri, 13 Dec 2013 18:24:51 +0000 |
| Subject: | Doc #66288 [Opn->Nab]: pow() gives unexpected results if exponent is negative | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-10708@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66288&edit=1
ID: 66288
Updated by: aharvey@php.net
Reported by: mattT1227 at gmail dot com
Summary: pow() gives unexpected results if exponent is
negative
-Status: Open
+Status: Not a bug
Type: Documentation Problem
Package: *General Issues
PHP Version: 5.5.7
Block user comment: N
Private report: N
New Comment:
pow() handles negative exponents fine: pow(4, -2) is 0.0625, which seems correct to me and also to
Wolfram|Alpha: http://www.wolframalpha.com/input/?i=4^-2
Closing not a bug.
Previous Comments:
------------------------------------------------------------------------
[2013-12-13 16:11:35] mattT1227 at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.pow
---
At least show example that negative exponents are not correctly implemented by pow.
Note, reporting system shows this problem has been suspended. It is still a problem.
Test script:
---------------
echo pow(4, -2); // should be same as square root of 4
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66288&edit=1