Closed
Description
Feature gate: #![feature(round_ties_even)]
This is a tracking issue for the round_ties_even
feature, which adds a new method to f32
and f64
for rounding to the nearest integer, with ties rounded to the nearest even number.
Public API
impl f32 {
fn round_ties_even(self) -> f32;
}
impl f64 {
fn round_ties_even(self) -> f64;
}
Steps / History
- Implementation: Add
round_ties_even
tof32
andf64
#95317 - Final comment period (FCP)
- Stabilization PR
Unresolved Questions
- Naming:
round_ties_even
,round_even
,round_to_even
,round_banker
... many ways to paint this bikeshed - Should the behavior of the
round
function be changed to this? - Is it okay to use
rint
in the implementaton? (see Addround_ties_even
tof32
andf64
#95317 (comment))
Metadata
Metadata
Assignees
Labels
Area: Floating point numbers and arithmeticCategory: An issue tracking the progress of sth. like the implementation of an RFCRelevant to the library API team, which will review and decide on the PR/issue.This issue / PR is in PFCP or FCP with a disposition to merge it.The final comment period is finished for this PR / Issue.