JuliaMath / JuliaMath/Primes.jl

`nextprime` not working well with BitIntegers

Open
#73 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
108
Forks
34
PR merge metrics
No merged PRs in 30d

Description

```
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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.