Skip to content

Commit 6deccca

Browse files
Fix overflow catch (#225)
The current implementation doesn't seem to catch the Integer overflow correctly
1 parent 934459f commit 6deccca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/methods.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ function _coefs(grid, p, q)
277277
# For high precision on the `\`, we use `Rational`, and to prevent overflows we use
278278
# `BigInt`. At the end we go to `Float64` for fast floating point math, rather than
279279
# rational math.
280-
C = [Rational{BigInt}(g^i) for i in 0:(p - 1), g in grid]
280+
C = [Rational{BigInt}(g)^i for i in 0:(p - 1), g in grid]
281281
x = zeros(Rational{BigInt}, p)
282282
x[q + 1] = factorial(big(q))
283283
return SVector{p}(Float64.(C \ x))

0 commit comments

Comments
 (0)