mangler@cit-vax.Caltech.Edu (System Mangler) (11/15/86)
In article <160@haddock.UUCP>, karl@haddock.UUCP (Karl Heuer) writes: > P.S. I like the way VAXen do this with floating point (the result of some > operation is NaN, which triggers an FPE on the *next* usage, giving the user > a chance to test for it first). I inherited an interpreter that uses this trick. Checking for a NaN was done by a call-by-reference assembly language routine; when I rewrote it as a call-by-value C routine, I got floating point exceptions. Why? The MOVD instruction that pushes the value on the stack will raise an FPE if asked to push a NaN! You have to be very careful how you look at those... Don Speck speck@vlsi.caltech.edu {seismo,rutgers,ames}!cit-vax!speck