Skip to content

Commit

Permalink
Full GSL statistics module for Perl
Browse files Browse the repository at this point in the history
  • Loading branch information
pjotrp committed Apr 9, 2009
1 parent c73b567 commit 8e8b8a1
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/mappings/swig/perl/test/test_gsl.pl
@@ -1,6 +1,14 @@
use ascilib::gsl;

my $result = gsl::gsl_stats_mean([3,4,5,7],1,4);
print "returns $result!\n";
my $data = [
17, 18, 16, 18, 12,
20, 18, 20, 20, 22,
20, 10, 8, 12, 16,
16, 18, 20, 18, 21
];

exit ($result != 4.75);
my $result1 = gsl::gsl_stats_kurtosis($data, 1, 20);
my $result2 = gsl::gsl_stats_mean([3,4,5,7],1,4);
print "returns $result1 and $result2!\n";

exit ($result2 != 4.75);

0 comments on commit 8e8b8a1

Please sign in to comment.