Document powf and powi values that are always 1.0#136012
Conversation
|
r? @ibraheemdev rustbot has assigned @ibraheemdev. Use |
This comment has been minimized.
This comment has been minimized.
|
Like @matthiaskrgr noted in the other PR, please merge these into one. I'm gonna leave this one open and close the rest. |
|
Also regarding this and those other PRs, please squash them into a single commit. A commit named "Add semicolon", "add space", etc is not adding much value to a 1 file change PR -- if you need help learning how to squash commits into one, I think any of us can point you how to do that :) |
|
@hkBst While we will not necessarily refuse PRs that have a remunerative motivation, we will definitely not accept degrading the quality of PRs to do so. I will accept this when you push an actual fix and it passes the standard of my review, and no sooner. |
|
@workingjubilee no remunerative motivation I can assure you. Apologies for any confusion arising from my use of the word "payout". EDIT: I meant "payoff" when I used "payout" (in the other comment), so I guess I was unidiomatic. Again, apologies for the confusion. |
|
Thank you. Yes, idiomatic English can be somewhat challenging, so I understand the slip. I also understand why you think it would be more efficient (or otherwise better) to send 4 PRs. It's just actually worse to have 4 people look at basically the same diff and have to individually activate their neurons to decide if the change is okay. Most importantly, they might decide differently, which is very bad. This documentation should absolutely be consistent between types (modulo where it needs to deviate, like value ranges). |
workingjubilee
left a comment
There was a problem hiding this comment.
Much better, thank you.
|
@bors r+ rollup |
|
@tgross35 Ah, I wondered what those were for, but could not find anywhere that explained them... Now added. |
| /// ``` | ||
| /// #![feature(f128)] | ||
| /// # #[cfg(reliable_f128_math)] { | ||
| /// | ||
| /// let x = 2.0_f128; | ||
| /// let abs_difference = (x.powi(2) - (x * x)).abs(); | ||
| /// assert!(abs_difference <= f128::EPSILON); | ||
| /// | ||
| /// assert_eq!(f128::powi(f128::NAN, 0), 1.0); | ||
| /// ``` |
There was a problem hiding this comment.
These need the trailing # } to match the opening # #[cfg(...)] {
There was a problem hiding this comment.
Right, of course... done now.
This comment has been minimized.
This comment has been minimized.
|
@rustbot ready |
There was a problem hiding this comment.
Thanks for the changes, LGTM but I'll wait for PR CI to pass.
@tgross35 Ah, I wondered what those were for, but could not find anywhere that explained them... Now added.
For reference, these get set here and the reasons are reasonably well documented
Lines 82 to 186 in 2f348cb
|
@bors r=workingjubilee,tgross35 |
fixes bug #90429