aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArun Isaac2021-02-05 15:38:49 +0530
committerArun Isaac2021-02-05 15:38:49 +0530
commit1bbb62ace6da1e258f9781d82311a6b696abf57e (patch)
tree4cc9b39b44bb4a98f7986394ae00135b582ba290 /src
parenta8cc65dc659834e4bf0c9508b327e62e52ad6644 (diff)
downloadnsmc-1bbb62ace6da1e258f9781d82311a6b696abf57e.tar.gz
nsmc-1bbb62ace6da1e258f9781d82311a6b696abf57e.tar.lz
nsmc-1bbb62ace6da1e258f9781d82311a6b696abf57e.zip
Replace underscores in identifiers with hyphens.
* src/utils.sc (angle-between-vectors, gaussian-cdf, bisection, bisection-rlimit): Replace underscores in identifiers with hyphens.
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")