[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Clarification for motion #27 -- Invalid+Inexact for Convert-to-Fixed



The issue is not *signalling* two exceptions, but *raising* two flags.
(One reason I liked David Hough's July motion #19 is that it clarified
multiple exceptions, so even then it should not be a problem, as the
Invalid signal could have overridden Inexact (at language designer's
option).)

When the Invalid Operation is signalled, the operation may be suppressed
entirely -- this is in a context where signalling involves invoking a
trap handler.  When Invalid Operation is handled using Default exception
handling, the issue of signalling two exceptions does not arise.

The eight-year-old implementation of IEEE 754 on IBM mainframes has
a Convert-to-Fixed instruction that raises both Invalid and Inexact
when both traps are disabled, and offers the opportunity to trap on
Inexact when Inexact is enabled but Invalid is disabled.  (When
Invalid is enabled, the instruction is suppressed and has no effect
other than to trap.)

Yes, it would have been nice if all IEEE 754 implementations had made
the same choices in areas left open by that standard...  but interrupt
reflection mechanisms differ enough on various platforms to have made
such uniformity unlikely.

Michel.
Sent: 2006-08-09 19:37:30 UTC

754 | revision | FAQ | references | list archive