3 our @EXPORT_OK = qw/gsl_pow_2 gsl_pow_2 gsl_pow_3
4 gsl_pow_4 gsl_pow_5 gsl_pow_6
5 gsl_pow_7 gsl_pow_8 gsl_pow_9 gsl_pow_int
7 our %EXPORT_TAGS = ( all => \@EXPORT_OK );
13 Math::GSL::PowInt - Integer Power functions
17 use Math::GSL::PowInt qw /gsl_pow_2 gsl_pow_4 gsl_pow_int/;
18 print '2**4 = ' . gsl_pow_2(4) . "\n";
19 print '4**7 = ' . gsl_pow_4(7) . "\n";
20 print '17**5 = ' . gsl_pow_int(17,5) . "\n";
24 This module implements the GSL Integer Power functions, which allow one to
25 quickly compute a given integer raised to any real number. It contains
26 gsl_pow_2 to gsl_pow_9 and gsl_pow_int. If you need a power higher than 9, you
27 can use gsl_pow_int, which takes a base as the first argument and power being
28 raised to as the second argument.
32 C<use Math::GSL::PowInt qw/:all/;>
34 to use all avaible functions of the module.
38 This module is used to speed up arithmetic operations. The underlying code
39 decomposes the multiplication in the most efficient way. Since it is
40 implemented in XS (via SWIG), it should lend a large performance increase over
41 the Perl builtin exponentiation operator, '**' .
45 Would someone like to submit some benchmarks?
49 Jonathan Leto <jonathan@leto.net> and Thierry Moisan <thierry.moisan@gmail.com>
51 =head1 COPYRIGHT AND LICENSE
53 Copyright (C) 2008 Jonathan Leto and Thierry Moisan
55 This program is free software; you can redistribute it and/or modify it
56 under the same terms as Perl itself.