Re: pow() vs. float when doing match.
| From: | Scott Fletcher | Date: | Wed, 24 Apr 2002 18:00:43 +0000 |
| Subject: | Re: pow() vs. float when doing match. | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-94427@lists.php.net to get a copy of this message | ||
Thanks! That's explain it! One other question. Is the even number a
stable release and the odd number an unstable release? Just like the Red
Hat Linux or Perl as an example. Does that apply to PHP?
THanks,
Scott
"Jim Winstead" <jimw@apache.org> wrote in message
news:20020424160241.47221.qmail@pb1.pair.com...
> Scott Fletcher <scott@abcoa.com> wrote:
> > 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!
>
> pow() was badly broken in the 4.1.x series, particularly in the various
> edge conditions (like using 0 for either argument). 4.2.0 gets it right.
>
> jim