Version française
Home     About     Download     Resources     Contact us    
Browse thread
float precision on AMD64
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Alan Falloon <Al.Falloon@s...>
Subject: Re: [Caml-list] float precision on AMD64
Your arguments against unboxing 64-bit floats are compelling, except one:

Ville-Pertti Keinonen wrote:

> While tagged floats might be a usable solution for some situations, 
> I'm sure I wouldn't be the only person unhappy with the situation if 
> they were made the default.  In OCaml they'd also be incompatible with 
> polymorphic compare; unlike other values with a tagged representation, 
> they can't be compared as if they were integers.

If we assume IEEE floating point format, then they can be compared as 
integers. See the section "Comparing using integers" in

http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm

Although equality comparisons are dangerous, of course.