Path: utzoo!utgpu!water!watmath!clyde!att!pacbell!lll-tis!helios.ee.lbl.gov!pasteur!ucbvax!MASIG1.OCEAN.FSU.EDU!mccalpin
From: mccalpin@MASIG1.OCEAN.FSU.EDU ("John D. McCalpin")
Newsgroups: comp.sys.sgi
Subject: Square Root Madness !
Message-ID: <8807081753.AA01368@masig1.ocean.fsu.edu>
Date: 8 Jul 88 17:53:13 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Organization: The Internet
Lines: 35

And you thought the exp() function had trouble --- look at what happens
when you give a negative argument to sqrt() while using the floating-point
accelerator ! Probably not what you expected!  By the way, this gives 
reasonable results without the fpa....
-------------------------------------------------------------------------
	program test
#include 
	call setfpe ( 0, 0 )
	do 10 i=-9,9
		print *, float(i), sqrt(float(i))
  10	continue
	end
-------------------------------------------------------------------------
 -9.000000   -6.159989
 -8.000000   -3.464574
 -7.000000   +5.890877
 -6.000000   +2.086059E+01
 -5.000000   -8.948573
 -4.000000   -2.449822
 -3.000000   +1.475061E+01
 -2.000000   -1.732287
 -1.000000   -1.224911
 +0.000000E+00   +0.000000E+00
 +1.000000   +1.000000
 +2.000000   +1.414214
 +3.000000   +1.732051
 +4.000000   +2.000000
 +5.000000   +2.236068
 +6.000000   +2.449490
 +7.000000   +2.645751
 +8.000000   +2.828427
 +9.000000   +3.000000
-------------------------------------------------------------------------
John D. McCalpin
mccalpin@nu.cs.fsu.edu