#41108 [Fbk->Opn]: pow() doesn't handle negative exponents
| From: | jack dot nerad at comcast dot net | Date: | Wed, 18 Apr 2007 00:36:25 +0000 |
| Subject: | #41108 [Fbk->Opn]: pow() doesn't handle negative exponents | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-111625@lists.php.net to get a copy of this message | ||
ID: 41108
User updated by: jack dot nerad at comcast dot net
Reported By: jack dot nerad at comcast dot net
-Status: Feedback
+Status: Open
Bug Type: Feature/Change Request
PHP Version: 6CVS-2007-04-17 (CVS)
New Comment:
Now that's turnaround time! I didn't even have to upgrade to the
latest version! :)
Actually, I was looking for how to do exponentiation in the docs, found
pow(), and read:
"Note: PHP cannot handle negative exps."
at
http://us.php.net/manual/en/function.pow.php
There's pretty much only one way to read that, I think, so I didn't
bother to look for features explicitly ruled out by the docs. In
addition, there are a bunch of notes with hacks on how to get around the
no negative exponents 'feature?'
(shrug)
Close this feature request, or whatever. Maybe change it to a bug in
the docs?
Previous Comments:
------------------------------------------------------------------------
[2007-04-17 08:27:42] tony2001@php.net
What are you talking about?
# php -r 'var_dump(pow(2,-2));'
float(0.25)
------------------------------------------------------------------------
[2007-04-17 01:37:39] jack dot nerad at comcast dot net
Description:
------------
It is a sin that PHP cannot handle negative exponents. Every other
respectable language that has half the vocabulary that PHP has can
handle negative exponents. Heck, even the windows calculator can handle
negative exponents. Please. Mature and refine the language to include
this ability.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41108&edit=1