1 use Test::More 'no_plan';
3 use Math::GSL::PowInt qw/:all/;
7 my $class = qw{Math::GSL::PowInt};
10 ok( gsl_pow_4(2) == gsl_pow_2(4) , q{%export_tags works} );
13 Math::GSL::_assert_dies( sub { gsl_pow_2() } , 'gsl_pow args');
14 Math::GSL::_assert_dies( sub { gsl_pow_2(1,2) } , 'gsl_pow args');
15 Math::GSL::_assert_dies( sub { gsl_pow_2(qw(1 2)) } , 'gsl_pow args');
19 'gsl_pow_2(3.14)' => (3.14) ** 2,
20 'gsl_pow_2(3)' => 3 ** 2,
21 'gsl_pow_2(0)' => 0 ** 2,
22 'gsl_pow_2(-1)' => (-1) ** 2,
23 'gsl_pow_3(4)' => 4 ** 3,
24 'gsl_pow_4(5)' => 5 ** 4,
25 'gsl_pow_5(6)' => 6 ** 5,
26 'gsl_pow_6(7)' => 7 ** 6,
27 'gsl_pow_7(8)' => 8 ** 7,
28 'gsl_pow_8(-4)' => (-4) ** 8,
29 'gsl_pow_9(4)' => 4 ** 9,
30 q{gsl_pow_2('nan')} => q{nan},
31 q{gsl_pow_2('inf')} => q{inf},
33 my $gsl = Math::GSL->new;
34 $gsl->verify_results($results, $class);