Function philosophy
Tim Peters
uunet!ksr.com!tim
Wed Dec 1 21:59:05 PST 1993
> [much interesting stuff deleted, just cuz i have nothing equally
> interesting to add]
> ...
> And I definitely prefer myself routines that can be seen as black
> boxes that think their arguments are exact and do the best possible.
All right: I take this as absolute evidence that all people who know what
they're doing are in complete agreement <smile>.
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?
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>.
eternally-surprised-that-users-put-up-with-exactly-the-wrong-things-
ly y'rs - tim
Tim Peters timaksr.com
not speaking for Kendall Square Research Corp
More information about the Numeric-interest
mailing list