erroneous claim at sources.redhat.com/gsl/ref/gsl-ref_4.html#SEC3 2

Brian Gough bjg@network-theory.co.uk
Wed Jul 16 15:49:00 GMT 2003


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



More information about the Gsl-discuss mailing list