aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/utils.sc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/utils.sc b/src/utils.sc
index 751cd77..d73d355 100644
--- a/src/utils.sc
+++ b/src/utils.sc
@@ -49,7 +49,7 @@ the range [0,pi]."
(declare dot-product double)
(gsl-blas-ddot x y (address-of dot-product))
;; TODO: Is this a valid floating point comparison?
- (return (if* (= dot_product 0)
+ (return (if* (= dot-product 0)
0
(acos (/ dot-product
(gsl-blas-dnrm2 x)
@@ -66,7 +66,7 @@ the range [0,pi]."
(return (gsl-ran-gaussian-pdf x 1)))
(define (gaussian-cdf x) (double double)
- "Return \\int_{-\\inf}^x gaussian_pdf(t) dt."
+ "Return \\int_{-\\inf}^x gaussian-pdf(t) dt."
(return (* 0.5 (+ 1 (gsl-sf-erf (/ x M-SQRT2))))))
(define (rerror approx exact) (double double double)
@@ -96,8 +96,8 @@ exact value EXACT."
(declare solution double)
(define (error-handler reason file line gsl-errno) (void (const char*) (const char*) int int)
(fprintf stderr "Bisection error handler invoked.\n")
- (fprintf stderr "f(%g) = %g\n" a (GSL_FN_EVAL f a))
- (fprintf stderr "f(%g) = %g\n" b (GSL_FN_EVAL f b))
+ (fprintf stderr "f(%g) = %g\n" a (GSL-FN-EVAL f a))
+ (fprintf stderr "f(%g) = %g\n" b (GSL-FN-EVAL f b))
(fprintf stderr "gsl: %s:%d: ERROR: %s\n" file line reason)
(abort))
@@ -113,10 +113,10 @@ exact value EXACT."
(return solution))
(define (bisection-rlimit f a b) (double gsl-function* double double)
- (let* ((sign int (SIGNUM (GSL_FN_EVAL f a))))
+ (let* ((sign int (SIGNUM (GSL-FN-EVAL f a))))
(for-i i BISECTION-MAX-ITERATIONS
(cond
- ((> (* sign (GSL_FN_EVAL f b)) 0)
+ ((> (* sign (GSL-FN-EVAL f b)) 0)
(set* b 2))
(else (return b)))))
(fprintf stderr "Bisection bracketing failed\n")