caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Turning floating point errors into exceptions
@ 2013-08-04  0:49 Yaron Minsky
  2013-08-14 16:19 ` Xavier Leroy
  0 siblings, 1 reply; 2+ messages in thread
From: Yaron Minsky @ 2013-08-04  0:49 UTC (permalink / raw)
  To: caml-list

This is really bringing up a rather old question to see whether the
state of the world has changed when it comes to handling floating
point exceptions.  Here's the thread on this topic from 2003.

http://caml.inria.fr/pub/ml-archives/caml-list/2003/10/686468535e6100213e2e85bca8be51f1.en.html

The key question is: is it possible to cause floating point operations
that generate values like NaN and inf to instead generate exceptions.
The answer from Xavier as of 2003 is: no, there's no good way of
portably catching a synchronous error like SIGFPE.  Apparently this is
in part due to the state of the C standards of the time.

So, I'm curious whether things have changed enough such that this
would now be easier.  The issue came up again because I've been
showing OCaml to a physicist friend who asked how to turn on this
behavior in OCaml, a thing he's used to from Fortran and considers
essential for debugging.

y

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-14 16:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-04  0:49 [Caml-list] Turning floating point errors into exceptions Yaron Minsky
2013-08-14 16:19 ` Xavier Leroy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).