On 2008 Jun 16, at 19:18, David Roundy wrote:
On Mon, Jun 16, 2008 at 4:07 PM, Evan Laforge <[EMAIL PROTECTED]>
wrote:
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. Or something. But then
what about this note in Control.Exception:
That's just not true. It depends on how your system (compiler?) is
configured, but the default on most systems that I've used is to
return NaNs.
It's how the system FPU is configured; most FPU hardware on Unixlike
systems let you configure the FPU behavior on a per-process basis,
although the amount of configurability may vary.
That said, the divide by zero exception you get in both C and Haskell
is *integer* divide-by-zero. Floating is mandated by IEEE standard to
produce Inf (but as said above, can usually be configured).
--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED]
system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED]
electrical and computer engineering, carnegie mellon university KF8NH
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe