xj2106 at columbia.edu
Mon Jun 16 19:35:24 EDT 2008
"Evan Laforge" <qdunkan at gmail.com> writes:
> So, I know this has been discussed before, but:
> ... so I see from the archives that Infinity is mandated by ieee754
> even though my intuition says both should be NaN.
> Every other language throws an exception, even C will crash the
> program, so I'm guessing it's telling the processor / OS to turn these
> into signals, while GHC is turning that off. [...]
No, C will not, with floating point type. The following
program prints out a string "inf\n".
int main (void)
double a=1, b=0;
i = a / b;
I believe Haskell is behaving rationally.
<\ * (__
More information about the Haskell-Cafe