Document results of non-positive logarithms#137357
Conversation
|
r? @Noratrieb rustbot has assigned @Noratrieb. Use |
This comment has been minimized.
This comment has been minimized.
|
This seems reasonable enough. Snips from 754 to back up the behavior, from section 9's exception table:
9.2.1 special values:
And then just confirming that FE_INVALID returns NaN:
Would you mind adding a note to |
|
Could you also add doc tests to confirm this behaviour? |
|
Triage: comments are not addressed |
This comment has been minimized.
This comment has been minimized.
|
LGTM but I'll run a try job to double check f128. Could you please squash? @bors try |
Document results of non-positive logarithms The integer versions of logarithm functions panic on non-positive numbers. The floating point versions have different, undocumented behaviour (-inf on 0, NaN on <0). This PR documents that. try-job: aarch64-gnu
|
☀️ Try build successful - checks-actions |
|
I squashed up all the commits. |
|
Looks great, thanks! @bors r+ |
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#137357 (Document results of non-positive logarithms) - rust-lang#138650 (Optimize `io::Write::write_fmt` for constant strings) - rust-lang#138694 (Fix: add ohos target notes) - rust-lang#138713 (interpret memory access hooks: also pass through the Pointer used for the access) - rust-lang#138724 (Check attrs: Don't try to retrieve the name of list stems) - rust-lang#138743 (bootstrap: add `--ci` flag) - rust-lang#138751 (Fix the "used_with_archive" test on Fuchsia) - rust-lang#138754 (Handle spans of `~const`, `const` and `async` trait bounds in macro expansion) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#137357 - syvb:sv/log-docs, r=tgross35 Document results of non-positive logarithms The integer versions of logarithm functions panic on non-positive numbers. The floating point versions have different, undocumented behaviour (-inf on 0, NaN on <0). This PR documents that. try-job: aarch64-gnu
Document results of non-positive logarithms The integer versions of logarithm functions panic on non-positive numbers. The floating point versions have different, undocumented behaviour (-inf on 0, NaN on <0). This PR documents that. try-job: aarch64-gnu
The integer versions of logarithm functions panic on non-positive numbers. The floating point versions have different, undocumented behaviour (-inf on 0, NaN on <0). This PR documents that.
try-job: aarch64-gnu