Primes.jl icon indicating copy to clipboard operation
Primes.jl copied to clipboard

`nextprime` not working well with BitIntegers

Open Keno opened this issue 5 years ago • 0 comments

julia> nextprime(Int256(2)^186)
ERROR: InexactError: trunc(Int256, 776096500322445173294029667436835618525483108491085984157372499045210168189608446442688888866620606620268602202040084040440848044843)

We're special casing Int128 to use the BigInt method. Perhaps we should do that more generally for larger integer types?

Keno avatar Aug 29 '19 20:08 Keno