Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a small mistake regarding NaNs in a deprecation message #56857

Merged
merged 1 commit into from
Dec 16, 2018

Conversation

tbu-
Copy link
Contributor

@tbu- tbu- commented Dec 15, 2018

max on floats returns the other argument if one of them is NaN, which
would be 0.0 in this case. This is unlike the C functions fdim and
fdimf which return NaN if either of their arguments is NaN.

https://doc.rust-lang.org/1.31.0/std/primitive.f32.html#method.max
https://en.cppreference.com/w/c/numeric/math/fdim

`max` on floats returns the other argument if one of them is NaN, which
would be `0.0` in this case. This is unlike the C functions `fdim` and
`fdimf` which return NaN if either of their arguments is NaN.

https://doc.rust-lang.org/1.31.0/std/primitive.f32.html#method.max
https://en.cppreference.com/w/c/numeric/math/fdim
@rust-highfive
Copy link
Collaborator

r? @TimNN

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 15, 2018
@zackmdavis
Copy link
Member

Thanks!

r? @zackmdavis

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Dec 15, 2018

📌 Commit 967b1fc has been approved by zackmdavis

@rust-highfive rust-highfive assigned zackmdavis and unassigned TimNN Dec 15, 2018
@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 15, 2018
Centril added a commit to Centril/rust that referenced this pull request Dec 16, 2018
Fix a small mistake regarding NaNs in a deprecation message

`max` on floats returns the other argument if one of them is NaN, which
would be `0.0` in this case. This is unlike the C functions `fdim` and
`fdimf` which return NaN if either of their arguments is NaN.

https://doc.rust-lang.org/1.31.0/std/primitive.f32.html#method.max
https://en.cppreference.com/w/c/numeric/math/fdim
bors added a commit that referenced this pull request Dec 16, 2018
Rollup of 20 pull requests

Successful merges:

 - #53506 (Documentation for impl From for AtomicBool and other Atomic types)
 - #56343 (Remove not used mod)
 - #56439 (Clearer error message for dead assign)
 - #56640 (Add FreeBSD unsigned char platforms to std::os::raw)
 - #56648 (Fix BTreeMap UB)
 - #56672 (Document time of back operations of a Linked List)
 - #56706 (Make `const unsafe fn` bodies `unsafe`)
 - #56742 (infer: remove Box from a returned Iterator)
 - #56761 (Suggest using `.display()` when trying to print a `Path`)
 - #56781 (Update LLVM submodule)
 - #56789 (rustc: Add an unstable `simd_select_bitmask` intrinsic)
 - #56790 (Make RValue::Discriminant a normal Shallow read)
 - #56793 (rustdoc: look for comments when scraping attributes/crates from doctests)
 - #56826 (rustc: Add the `cmpxchg16b` target feature on x86/x86_64)
 - #56832 (std: Use `rustc_demangle` from crates.io)
 - #56844 (Improve CSS rule)
 - #56850 (Fixed issue with using `Self` ctor in typedefs)
 - #56855 (Remove u8 cttz hack)
 - #56857 (Fix a small mistake regarding NaNs in a deprecation message)
 - #56858 (Fix doc of `std::fs::canonicalize`)

Failed merges:

 - #56741 (treat ref-to-raw cast like a reborrow: do a special kind of retag)

r? @ghost
@bors bors merged commit 967b1fc into rust-lang:master Dec 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants