bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gawk bug in exponentiation


From: John H. DuBois III
Subject: Re: gawk bug in exponentiation
Date: Tue, 14 Jun 2005 17:10:11 -0700
User-agent: Mutt/1.3.28i

Looks good - in all of the tests I've run it works perfectly!

        John

On Tue, Jun 14, 2005 at 09:43:00AM -0400, Andrew J. Schorr wrote:
> On Tue, Jun 14, 2005 at 08:43:46AM -0400, Andrew J. Schorr wrote:
> > But beyond that, I think there are 2 issues here: 1. the same function 
> > should
> > be used in both places; and 2. the exponentiation algorithm is not very 
> > good,
> > instead exponentiation by squaring should be used:
> > 
> >    http://en.wikipedia.org/wiki/Exponentiation_by_squaring
> 
> Give the attached patch a try.  It uses exponentiation by squaring for
> all integral exponents.  And it does so without recursion.
> 
> Regards,
> Andy

-- 
John DuBois  address@hidden  KC6QKZ/AE  http://www.armory.com/~spcecdt/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]