Function philosophy

uunet!cwi.nl!Dik.Winter uunet!cwi.nl!Dik.Winter
Thu Dec 2 08:56:46 PST 1993


 > So is it (finally) time to nudge standards and manufacturers to catch up
 > to good current practice?  Several efficient approaches for achieving
 > error bounds strictly less than 1 ulp are known now (at least for all the
 > workhorse functions (trigonometrics, logs, exponentials)), and they're
 > becoming widespread.  Who would object if a standard committee screwed up
 > a bit of courage and insisted on < 1 ulp error for such functions?

< 1 ulp can not reasonably be requested.  You *must* allow for deficient
hardware and implementation in an HOL.  But it is certainly feasable to
make strong requirements.  If you want to see how such can be done, look
at the (upcoming?) standard for the elementary functions for Ada, together
with the rationale by Ken Dritz from Argonne.  It can also be found (I
think) in the draft Ada 9X standard I just received.

Much thought has gone into it.  The complete set of functions is based on
an early proposal I made for a EEC funded project by George Symm and Brian
Whichman from NPL, UK and Jan Kok and me from CWI, NL.  It has gone through
a follow-up project by NPL, CWI, NAG and some subcontractors.  Later the
Ada Europe Numerics Working Group has gone over it as has done the SigAda
Numeric Interest Group.  And lastly it has gone to ISO for standardization
for Ada 80 and to the Ada team for Ada 9X for incorporation in Ada 9X.

If there is interest I can formulate a summary (and with more looking
around I can perhaps find an on-line copy of some stuff).

Note however that this standard is based on a language standard that has
already fairly stringent requirements for the base arithmetic.

On the other hand, it would be perfectly feasible (I think) if requirements
were formulated for the case where the base system tells it is IEEE
compliant.

 > I don't know, but it would be interesting to find out.  The adoption of
 > such a requirement would go a long way toward reducing confusion and
 > insanity (e.g., that's enough to guarantee |cos(x)| <= 1 and cos(0) ==
 > 1).  And it would give me a defense against the next complaint that
 > sin(987492874*3.14) didn't return 0.0 <0.5 grin>.

Indeed, the Ada standard requires cos(0) = 1.  But so does it require
that 3.0/3.0 = 1.0, which some (non-IEEE obviously) machines can not meet.

 > eternally-surprised-that-users-put-up-with-exactly-the-wrong-things-
 >    ly y'rs  - tim

But there are always those hardware vendors that let them put up with
exactly the wrong things.

Cheers, dik
--
dik t. winter, cwi, kruislaan 413, 1098 sj  amsterdam, nederland
home: bovenover 215, 1025 jn  amsterdam, nederland; e-mail: dikacwi.nl



More information about the Numeric-interest mailing list