Skip to content

Tracking Issue for round_ties_even #96710

Closed
@Jules-Bertholet

Description

@Jules-Bertholet

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

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 Add round_ties_even to f32 and f64 #95317 (comment))

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-floating-pointArea: Floating point numbers and arithmeticC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions