Skip to content

Instantly share code, notes, and snippets.

@jayemerson
Created July 13, 2011 23:45
Show Gist options
  • Select an option

  • Save jayemerson/1081586 to your computer and use it in GitHub Desktop.

Select an option

Save jayemerson/1081586 to your computer and use it in GitHub Desktop.
Almost there... I can feel it.
# Line indicated below is generating the error: "get_number() not implemented in class 'FixedFloatArray'"
.sub '' :anon :load
.....
# Documented http://www.gnu.org/software/gsl/manual/html_node/Mean-and-standard-deviation-and-variance.html if you want to check the signature...
dlfunc nci, lib, 'gsl_stats_mean', 'dpll'
set_global ['GSL'], 'gsl_stats_mean', nci
......
.end
sub mean(*@args) {
return Q:PIR {
.local num ans
.local pmc gsl_stats_mean
$P0 = new ["FixedFloatArray"], 2
$P0[0] = 2.71828
$P0[1] = 3.14159
gsl_stats_mean = get_global ['GSL'], 'gsl_ran_gaussian_pdf'
ans = gsl_stats_mean($P0, 1, 2) #################### <<<<<<<<--------------
%r = box ans
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment