From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_05,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,79720e5f1992e61e X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: Math functions in Ada Date: 1997/05/16 Message-ID: #1/1 X-Deja-AN: 242068053 References: <5ka4nc$man@news1.mnsinc.com> <5lhvrk$cqj@mtinsc05.worldnet.att.net> Organization: New York University Newsgroups: comp.lang.ada Date: 1997-05-16T00:00:00+00:00 List-Id: Jacob says <> AARGH! This is a *horrible* equivalence to use in any program, since the error bounds are simply awful. In other words, even with a perfectly accurate exp and log, the result of computing x**y can be way off (hundreds of ULP's) True, as Jacob suggests, if you can use a higher precisoin intermediate type, then this formula is OK, and indeed one of the classic illustrations of the utility of IEEE extended precision is precisely this one (i.e. if you have accurate extended precision long and exp, as on the x86, then you can compute long_form x**y accurately. For a detailed analysis of this case, see chapter 5 of my book on Microprocessors.