Fixed type error in "bernoulli.rkt"

If you merge e1b6e84089, please merge this as well (or math won't
compile)
This commit is contained in:
Neil Toronto 2013-01-19 18:56:37 -07:00
parent 564f589601
commit ddec613dc9

View File

@ -56,11 +56,11 @@
(for/fold: ([sum : Exact-Rational 0] (for/fold: ([sum : Exact-Rational 0]
[bin : Integer (binomial (+ m 3) m-6)] [bin : Integer (binomial (+ m 3) m-6)]
) ([j (in-range 1 (+ M 1))]) ) ([j (in-range 1 (+ M 1))])
(values (+ sum (* bin (bern (- m (* 6 j))))) (values (+ sum (* bin (bern (assert (- m (* 6 j)) natural?))))
(next-binom bin (+ m 3) (- m (* 6 j)))))) (next-binom bin (+ m 3) (- m (* 6 j))))))
sum])) sum]))
(: bern : Integer -> Exact-Rational) (: bern : Natural -> Exact-Rational)
(define (bern n) (define (bern n)
(bs-ref! (bs-ref!
n (λ () n (λ ()