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=1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,33411c81953c1a23 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: Ada83 Exponentiation HELP !!! Date: 1999/12/19 Message-ID: <83hin0$f8v$1@nnrp1.deja.com>#1/1 X-Deja-AN: 562448750 References: <831tka$rue$1@tobruk.sydney.gecm.com> <3855ab32.0@news.pacifier.com> X-Http-Proxy: 1.0 x23.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Sun Dec 19 03:16:49 1999 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-12-19T00:00:00+00:00 List-Id: In article , Preben Randhol wrote: > "DuckE" writes: > > | It's been years since I've dealt with evaluating things like this, but as I > | recall 6^(1.3) is equivalent to: > | > | Exp( 1.3 * Log( 6 ) ) > ^^^ > Just to make it clear, Log here must be the natural logarithm Ln > > Ln(a^b) = b*Ln(a) > > a^b = exp(b*Ln(a)) ; a > 0 > > Isn't this correct? No it is completely wrong. See chapter 5 on IEEE arithmetic in my microprocessors book if you can find a copy around :-) In that chapter I use this example to motivate the need for IEEE extended format, but of course only the ia32 and ia64 architectures provide this in hardware among commonly used processors, so the above algorithm should almost never be used. Even if the log and exp routines are last bit accurate the result of the exponentiation can be very far off being last bit accurate, and there are perfectly good accurate algorithms available.h Sent via Deja.com http://www.deja.com/ Before you buy.