caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Yaron Minsky <yminsky@janestreet.com>
To: "caml-list@inria.fr" <caml-list@inria.fr>
Subject: [Caml-list] Turning floating point errors into exceptions
Date: Sat, 3 Aug 2013 20:49:46 -0400	[thread overview]
Message-ID: <CACLX4jTdwP-O81J4BB6p1QJ2SCGSh+7Jw25Wum0WH6ET-D+WrQ@mail.gmail.com> (raw)

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

             reply	other threads:[~2013-08-04  0:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-04  0:49 Yaron Minsky [this message]
2013-08-14 16:19 ` Xavier Leroy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACLX4jTdwP-O81J4BB6p1QJ2SCGSh+7Jw25Wum0WH6ET-D+WrQ@mail.gmail.com \
    --to=yminsky@janestreet.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).