Adding basic FFT example
[Math-GSL.git] / PowInt.i
blobe4ca548b0999c1b09a856ed2c19571701bb5ed44
1 %module "Math::GSL::PowInt"
2 %{
3 #include "gsl/gsl_pow_int.h"
4 %}
6 %include "gsl/gsl_pow_int.h"
8 %perlcode %{
10 our @EXPORT_OK = qw/gsl_pow_2 gsl_pow_2 gsl_pow_3
11 gsl_pow_4 gsl_pow_5 gsl_pow_6
12 gsl_pow_7 gsl_pow_8 gsl_pow_9 gsl_pow_int
14 our %EXPORT_TAGS = ( all => \@EXPORT_OK );
16 __END__
18 =head1 NAME
20 Math::GSL::PowInt - Integer Power functions
22 =head1 SYNOPSIS
24 use Math::GSL::PowInt qw /gsl_pow_2 gsl_pow_4 gsl_pow_int/;
25 print '2**4 = ' . gsl_pow_2(4) . "\n";
26 print '4**7 = ' . gsl_pow_4(7) . "\n";
27 print '17**5 = ' . gsl_pow_int(17,5) . "\n";
29 =head1 DESCRIPTION
31 This module implements the GSL Integer Power functions, which allow one to
32 quickly compute a given integer raised to any real number. It contains
33 gsl_pow_2 to gsl_pow_9 and gsl_pow_int. If you need a power higher than 9, you
34 can use gsl_pow_int, which takes a base as the first argument and power being
35 raised to as the second argument.
37 You can also write
39 C<use Math::GSL::PowInt qw/:all/;>
41 to use all avaible functions of the module.
43 =head1 PURPOSE
45 This module is used to speed up arithmetic operations. The underlying code
46 decomposes the multiplication in the most efficient way. Since it is
47 implemented in XS (via SWIG), it should lend a large performance increase over
48 the Perl builtin exponentiation operator, '**' .
50 =head1 BENCHMARKS
52 Would someone like to submit some benchmarks?
54 =head1 AUTHORS
56 Jonathan Leto <jonathan@leto.net> and Thierry Moisan <thierry.moisan@gmail.com>
58 =head1 COPYRIGHT AND LICENSE
60 Copyright (C) 2008 Jonathan Leto and Thierry Moisan
62 This program is free software; you can redistribute it and/or modify it
63 under the same terms as Perl itself.
65 =cut