Dynamic rounding modes are bunk

Jon L White validgh!uunet!lucid.com!jonlaSun.COM
Thu Jan 24 23:32:50 PST 1991


re: > The only advantage I've heard for dynamic rounding modes is to use them
    > to help detect unstable numeric computations.  . . . 

    As a practical matter, on existing large realistic applications, this
    approach is a fairly reliable way to determine if your problem is ill
    conditioned or your algorithm unstable.  There are other ways to do the
    same thing, but they may be more trouble.

It's good to hear you say this.  I've been using this argument to retain 
the IEEE traps interface in Lucid Common Lisp.  Usually, the hackers
who are porting the generic interface to various platforms (e.g., SPARC, 
MIPS, RS6000, . . . ) raise the question of the utility, because this is
for them one of the less-interesting porting variations, that forces them 
to read the hardware documentation in more detail than anyone ever wanted 
to know.  

At this point, however, I must confess that I'm only aware of individual 
Lisp users who use the dynamic-scoping construct to temporarily gag a
potential overflow or underflow "condition" (Common Lisp has a rich 
condition signaling and restart mechanism).  Probably FORTRAN is the first 
choice of those who really know what they're doing here . . .

The hardware state bits are, of course, global state.  Trying to emulate 
a lexical scoping of this state by the equivalent of "system calls" or 
co-processor instructions to alter the (global) bits -- well that's a 
difficult call for most commercial-quality Common Lisps.  The trouble is 
that most such Lisps have a shared-memory multitasking facility, and it 
isn't clear whether or not these tasks (or "mini threads"?) should acceed 
to the global setting, or should establish their own FP state bits.  I wonder
if this issue ever came up in the 754 deliberations?   ADA was around, with 
the potential for multitasking back then, wasn't it?

Sorry to distract from the NCEG focus, but some of Lisp's abilities re 
signal "catch" points and restartings -- not the FP operation per se,  but 
the computation or process in general -- might be enlightening; ask me 
privately if you're interested.



-- JonL --



More information about the Numeric-interest mailing list