Language-Compatible Arithmetic
Donn Terry
donnahpfcrn.hp.com
Wed Jan 17 10:53:45 PST 1990
As you may know, I had proposed some tightening up of the math (trig, etc.)
functions for C so that the error reporting conditions would be consistent
at least across POSIX implementations. One of the elements of feedback
I got was inconsistent information about whether, when an exception occurs,
it should be signaled immediately or saved in the result value (as an
INF or NAN). The C committee clearly decided that the "print a message"
school of thought was inappropriate by deviating from existing practice
with matherr.
In the Paper in SigPlan Notices (V 25 No. 1, January 1990) titled
"Proposal for a Language Compatible Arithmetic Standard" the authors
propose that if an exception (in this case, simple arithmetic) should
occur it must be signalled either with a textual message or with some
sort of forced change of flow of control (basically, in C terms, a
signal). This seems to conflict with much of the input I received that
neither messages nor flow of control changes were appropriate, particularly
for highly parallell machines, and that exceptional result values (which
propigate) were preferred.
If I am to go forward with tightening up C in this area (which isn't
decided yet) some feedback on this topic, particularly given this proposed
standard, would be very useful.
Donn Terry
HP, Ft. Collins
(And, in this case, representing no-one but myself.)
More information about the Numeric-interest
mailing list