fix nextpow, prevpow for types without typemax#49669
fix nextpow, prevpow for types without typemax#49669IanButterworth merged 1 commit intoJuliaLang:masterfrom
nextpow, prevpow for types without typemax#49669Conversation
|
Note how the current version is consistent (+c), free of sideeffects (+e), always terminates (+t), doesn't access task local state (+s) and only uses memory inaccessible to other functions (+m). In contrast, the new version taints all these effects, making it non-constant foldable for all argument types. See I think it'll be better to write a specialized method for |
|
Oof, OK. I guess this means that |
|
No, Regardless, if performance for |
nextpow, prevpow for types without typemax
|
Ping. The failures are system-dependent and surely unrelated. |
|
@Seelengrab are your concerns resolved? |
|
If |
|
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, revealed after fixing the previous one, was a missing `promote` for the arguments of a `mul_with_overflow` call. Fixes JuliaLang#57906
|
bump |
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 (cherry picked from commit 3627a85)
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 (cherry picked from commit 3627a85)
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 (cherry picked from commit 3627a85)
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 (cherry picked from commit 3627a85)
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 (cherry picked from commit 3627a85)
Without this change
prevpowandnextpowfail for, e.g.,BigInt; incorrectly throwing aMethodError. For example, calls likeprevpow(3, big"10")ornextpow(3, big"10")fail.The issue is that the code incorrectly assumes the existence of a
typemaxmethod.Another issue was a missing promote for the arguments of a
mul_with_overflowcall.Fixes #57906