On Fri, Mar 01, 2002 at 10:24:08AM +0100, jeroen dobbelaere wrote:
> Hi,
> 
> I've been 'hit' by following problem when using mozilla on an arm-linux 
> system :
>   <http://bugzilla.mozilla.org/show_bug.cgi?id=9967>
> 
> In short, the problem is about verifying if a double can be converted to an
> int. This is done by converting it to int and back to a double and checking 
> if
> the result is the same.

Good job you said int, and not integer (well, long long)
I think you'll find that 18446744073709551616.0 will happily convert to
0xFFFFFFFFFFFFFFFF and in turn 0xFFFFFFFFFFFFFFFF will happily convert back to
18446744073709551616.0

Only other platform I seem to remember which was capable of similar floating
point weirdness was a Cray. [and it did something differently weird]

If this is relevant and you really need the answer to exactly what the false
test was I can dig it up. But the upshot was that perl's Configure (possibly
in the release 5.6.0, but maybe only in development versions) concluded that
on ARM double could preserve the largest unsigned long long. Oops. :-)

Nicholas Clark

_______________________________________________
http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
http://www.arm.linux.org.uk/armlinux/mailinglists.php
Please visit the above addresses for information on this list.

Reply via email to