On Tue, 4 Dec 2001 23:05:04 +0100 (CET)
Derick Rethans <[EMAIL PROTECTED]> wrote:

> Hello,
> 
> this is how floating point numbers work.
> 
> 3.55 as float is not 'exactly' 3.55, but it is stored in memory as an as
> good as possible representation, something like 3.55000000001 perhaps.
> 
> If you simply compare this:
> 3.55000000000001 + 60.12000000000000001 != 63.66666666666669
And as far I can remember, never compare non "ordinal" (1,2,3 is) value. Whatever 
langage you use, binary egality test on float is very dangerous.

hth

pa



-- 
Pierre-Alain Joye
Freelance
Developpements et Services web/intranet
[EMAIL PROTECTED]

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to