comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: Ada83 Exponentiation HELP !!!
Date: 1999/12/19
Date: 1999-12-19T00:00:00+00:00	[thread overview]
Message-ID: <83hin0$f8v$1@nnrp1.deja.com> (raw)
In-Reply-To: m3puw9uacy.fsf@kiuk0156.chembio.ntnu.no

In article <m3puw9uacy.fsf@kiuk0156.chembio.ntnu.no>,
  Preben Randhol <randhol@pvv.org> wrote:
> "DuckE" <nospam_steved@pacifier.com> 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.




  reply	other threads:[~1999-12-19  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-13  0:00 Ada83 Exponentiation HELP !!! jxredi
1999-12-13  0:00 ` David C. Hoos, Sr.
1999-12-13  0:00 ` Gautier
1999-12-13  0:00 ` DuckE
1999-12-14  0:00   ` Preben Randhol
1999-12-19  0:00     ` Robert Dewar [this message]
1999-12-19  0:00       ` Preben Randhol
1999-12-19  0:00   ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox