aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/oracles.sc13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/oracles.sc b/src/oracles.sc
index 173ac75..4182683 100644
--- a/src/oracles.sc
+++ b/src/oracles.sc
@@ -24,13 +24,12 @@
;; TODO: Verify the accuracy of this function for non-trivial a, b.
(define (uniform-true-volume dimension -params) (double (unsigned int) void*)
- (let* ((params (const uniform-params*) (convert-type -params uniform-params*)))
- (return (- (exp (+ (ln-volume-of-ball dimension)
- (* dimension (log (: params b)))
- (- (log (+ dimension 1)))))
- (exp (+ (ln-volume-of-ball dimension)
- (* dimension (log (: params a)))
- (- (log (+ dimension 1)))))))))
+ (let* ((params uniform-params* (convert-type -params uniform-params*)))
+ (return (* (volume-of-ball dimension)
+ (- (/ (gsl-pow-uint (: params b) (+ dimension 1))
+ (+ dimension 1))
+ (/ (gsl-pow-uint (: params a) (+ dimension 1))
+ (+ dimension 1)))))))
(define (beta-extent-oracle r x -params) (double (const gsl-rng*) (const gsl-vector*) void*)
(let* ((params (const beta-params*) (convert-type -params beta-params*)))