Re: [Haskell] Platform-dependent behaviour with functions on NaN

2006-04-14 Thread Robby Findler
I don't know if it would help, but PLT Scheme has been thru this and Matthew Flatt has a nice test suite that you can see here: http://svn.plt-scheme.org/plt/trunk/collects/tests/mzscheme/number.ss To help read the code, when you see something like: (test a b c ...) that is the same thing a

Re: [Haskell] Platform-dependent behaviour with functions on NaN

2006-04-14 Thread Lennart Augustsson
Yeah, I think it boils down to different representations of NaN on different platform. I guess I forgot to test for NaN when I wrote (the C code for) decodeFloat. It should generate some consistent result. On the other hand, if you have code that possible divides by 0 and don't check for it, wel

[Haskell] Platform-dependent behaviour with functions on NaN

2006-04-13 Thread Geisler, Tim (EXT)
In Haskell, the behaviour of functions on floating-point values which are NaN can be platform dependent.   On "SunOS sun 5.9 Generic_118558-09 sun4u sparc SUNW,Sun-Blade-1500": Prelude> ceiling (0/0)359538626972463141629054847463408713596141135051689993197834953606314521560057077521179117265