Re: Why do these values not match?
| From: | szii at sziisoft dot com | Date: | Wed, 26 Jun 2002 01:14:13 +0000 |
| Subject: | Re: Why do these values not match? | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-20117@lists.php.net to get a copy of this message | ||
IEEE standard is precision to 6 decimal places.
Having an epsilon of < 2 is ridiculously small, and
well under the IEEE / ANSI standard. While floats
should never be directly compared as a matter of
course, in this instance it's a bit silly.
-Mike
----- Original Message -----
From: "Pierre-Alain Joye" <paj@pearfr.org>
To: <szii@sziisoft.com>
Cc: <manuel@ochoa-usa.com>; <php-db@lists.php.net>
Sent: Tuesday, June 25, 2002 4:16 PM
Subject: Re: [PHP-DB] Why do these values not match?
> On Tue, 25 Jun 2002 15:58:22 -0700
> <szii@sziisoft.com> wrote:
>
> > Looks like a bug in PHP since the types are both
> > set correctly and appear equal. Doing a cast/recast
> > should never change the "value" and have it suddenly
> > compare okay via the last "!=" operator.
> No, that is definitively not a bug. Check the bugs archive or general php list for further
> infos or a full description. It's a
normal comportment with floating point numbers.
>
> hth
>
> pa