This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: erroneous claim at sources.redhat.com/gsl/ref/gsl-ref_4.html#SEC32
- From: Brian Gough <bjg at network-theory dot co dot uk>
- To: keith dot briggs at bt dot com
- Cc: gsl-discuss at sources dot redhat dot com
- Date: Wed, 16 Jul 2003 16:49:08 +0100
- Subject: Re: erroneous claim at sources.redhat.com/gsl/ref/gsl-ref_4.html#SEC32
- References: <0AAF93247C75E3408638B965DEE11A707B7B23@i2km41-ukdy.nat.bt.com>
keith.briggs@bt.com writes:
> > Function: double gsl_pow_int (double x, int n)
> >This routine computes the power x^n for integer n. The power is
> computed using the minimum number of multiplications.
> A glance at the source code shows that this is wrong. It uses repeated
> squaring, so, for example, x^15 is computed
> with 6 multiplies, whereas it can be done with 5.
Thanks for pointing that out. I've changed the manual to say the
algorithm is "efficient" rather than using the minimum number of
multiplications.
--
Brian