pow() vs. float when doing match.
| From: | Scott Fletcher | Date: | Wed, 24 Apr 2002 15:35:13 +0000 |
| Subject: | pow() vs. float when doing match. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-94402@lists.php.net to get a copy of this message | ||
Hi!
There is the calculation errors for the floating point, so I checked the
PHP website. On that website, the function webpage, pow(). It said that
"In PHP 4.0.6 and earlier pow() always returned a float, and did not issue
warnings.". So, there was some changes to the pow() on PHP 4.0.7 and after.
Let's do the demo script.
echo pow(0, 0.0829);
It should return a "0" as it did in version 4.0.6 and before. But
version 4.0.7 and after, it returned a "-1.#IND". Why is that? What is the
other way around to fix the problem? Let me know!
Thanks,
Scott