Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
bksaiki committed Dec 9, 2024
1 parent a25242c commit 6143d0b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
11 changes: 0 additions & 11 deletions private/ffi.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -146,17 +146,6 @@
(mpfr-subnormalize r t (mpfr-rounding-mode)))
r)

(define mpfr-sum-fun
(get-mpfr-fun 'mpfr_sum (_fun _mpfr-pointer (_list i _mpfr-pointer) _ulong _rnd_t -> _int)))

(define (mpfr-sum xs)
(define r (bf 0))
(define t (mpfr-sum-fun r xs (length xs) (mpfr-rounding-mode)))
(mpfr-check-range r 0 (mpfr-rounding-mode))
(when (mpfr-subnormalize?)
(mpfr-subnormalize r t (mpfr-rounding-mode)))
r)

(define (mpfr-set x)
(define v (if (bigfloat? x) (bfcopy x) (bf x)))
(mpfr-check-range v 0 (mpfr-rounding-mode))
Expand Down
4 changes: 2 additions & 2 deletions private/gfl.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,8 @@
[(list) 1.bf]
[(list x) (bfcopy x)]
[(list x y rest ...)
(for/fold ([sum (mpfr-mul x y)]) ([z (in-list rest)])
(mpfr-mul sum z))]))
(for/fold ([prod (mpfr-mul x y)]) ([z (in-list rest)])
(mpfr-mul prod z))]))

(define (mpfrv/ x . xs)
(match xs
Expand Down
1 change: 0 additions & 1 deletion private/mpfr.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
mpfr-lgamma
mpfr-jn
mpfr-yn
mpfr-sum
mpfr-set
mpfr-set-ebounds!)

Expand Down

0 comments on commit 6143d0b

Please sign in to comment.