-
Notifications
You must be signed in to change notification settings - Fork 12.1k
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
Stabilize div_duration
#124667
Stabilize div_duration
#124667
Conversation
This comment has been minimized.
This comment has been minimized.
This still needs FCP. Nominating for T-libs-api so they'll see it. |
We discussed this in today's @rust-lang/libs-api meeting. We were generally favorable towards adding these. But also, multiple people expressed a preference that these could be more accurate by doing the math in nanos rather than seconds. That said: @rfcbot merge |
Team member @joshtriplett has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
Hm, comparing the two expressions: let s1 = (d1.secs as f32) + (d1.nanos as f32) / (NANOS_PER_SEC as f32);
let s2 = (d2.secs as f32) + (d2.nanos as f32) / (NANOS_PER_SEC as f32);
s1 / s2 let s1 = (d1.secs as f32) * (NANOS_PER_SEC as f32) + (d1.nanos as f32);
let s2 = (d2.secs as f32) * (NANOS_PER_SEC as f32) + (d2.nanos as f32);
s1 / s2 I guess the latter should be indeed slightly more accurate. The former will often lose precision in the nanos division, while in the latter case, if loss of precision has happened during multiplication, addition of nanos is unlikely to change the final result. Should I replace the methods implementation? |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
I'm indifferent. The |
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. This will be merged soon. |
@bors r+ |
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#121377 (Stabilize `LazyCell` and `LazyLock`) - rust-lang#122986 (Fix c_char on AIX) - rust-lang#123803 (Fix `VecDeque::shrink_to` UB when `handle_alloc_error` unwinds.) - rust-lang#124080 (Some unstable changes to where opaque types get defined) - rust-lang#124667 (Stabilize `div_duration`) - rust-lang#125472 (tidy: validate LLVM component names in tests) - rust-lang#125523 (Exit the process a short time after entering our ctrl-c handler) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#124667 - newpavlov:stabilize_div_duration, r=jhpratt Stabilize `div_duration` Closes rust-lang#63139
Closes #63139