julia
3627a857 - fix `nextpow`, `prevpow` for types without `typemax` (#49669)

Commit
275 days ago
fix `nextpow`, `prevpow` for types without `typemax` (#49669) Without this change `prevpow` and `nextpow` fail for, e.g., `BigInt`; incorrectly throwing a `MethodError`. For example, calls like `prevpow(3, big"10")` or `nextpow(3, big"10")` fail. The issue is that the code incorrectly assumes the existence of a `typemax` method. Another issue was a missing promote for the arguments of a `mul_with_overflow` call. Fixes #57906
Author
Parents
Loading