Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2005-04-11 (13:24)
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

Although equality comparisons are dangerous, of course.