Both machines use
the binary distributions of GHC 6.4.1.
In our production code, this error
(which is actually an error in our program) occured inside a quite complex
expression which can be simplified to max 0 (ceiling (0/0)). On Windows,
we did not recognize the error in the program, because the complex expression
just returned 0. On Solaris, the complex expression returned
this large number (which represents in the application "the number of CPUs
needed in a certain device" ;-)
We develop Haskell programs on Windows and
run them in production on Sparc with Solaris. It seems that we have to run
special regression tests testing for differences between Sparc Solaris and
Windows.
The Haskell 98 report http://www.haskell.org/onlinereport/basic.html#sect6.4 states:
"The results of exceptional conditions (such as overflow or underflow) on the
fixed-precision numeric types are undefined; an implementation may choose error
(_|_, semantically), a truncated value, or a special value such as
infinity, indefinite, etc."
Is there a chance to
- properly define the behaviour of functions
depending on the function properFraction for values like NaN, Infinity,
...?
- get an implementation of this in GHC which
computes the same results for all platforms?
Perhaps the function properFraction could
raise an exception in case of isNaN and isInfinity?
Tim