aboutsummaryrefslogtreecommitdiff
path: root/scm
diff options
context:
space:
mode:
Diffstat (limited to 'scm')
-rw-r--r--scm/extent-sampling/wrap.scm10
1 files changed, 10 insertions, 0 deletions
diff --git a/scm/extent-sampling/wrap.scm b/scm/extent-sampling/wrap.scm
index 63d3d9e..65fd7ad 100644
--- a/scm/extent-sampling/wrap.scm
+++ b/scm/extent-sampling/wrap.scm
@@ -158,6 +158,16 @@
(dynamic-func "gsl_rstat_n" lib-extentsampling)
(list '*)))
+;; Polynomial functions
+
+(define-public (polyval coefficients x)
+ ((pointer->procedure double
+ (dynamic-func "gsl_poly_eval" lib-gsl)
+ (list '* int double))
+ (bytevector->pointer (list->typed-array 'f64 1 coefficients))
+ (length coefficients)
+ x))
+
;; nd-random
(define-public (random-direction-vector dimension)