[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gawk bug in exponentiation
From: |
Andrew J. Schorr |
Subject: |
Re: gawk bug in exponentiation |
Date: |
Tue, 14 Jun 2005 09:43:00 -0400 |
User-agent: |
Mutt/1.4.1i |
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
exp.patch
Description: Text document
- gawk bug, John H. DuBois III, 2005/06/14
- Re: gawk bug, Andrew J. Schorr, 2005/06/14
- Re: gawk bug in exponentiation,
Andrew J. Schorr <=
- Message not available