Skip to content

Tracking Issue for #![feature(const_float_round_methods)] #141555

Open
@ruancomelli

Description

@ruancomelli

Feature gate: #![feature(const_float_round_methods)]

This is a tracking issue for making const some methods of floating point types:

  • f64::{floor, ceil, trunc, fract, round, round_ties_even}
  • and the corresponding methods for f16, f32 and f128

This extends the work done in #130843

Public API

// in `core`
impl <float> {
    // ...
    pub const fn floor(self) -> Self;
    pub const fn ceil(self) -> Self;
    pub const fn trunc(self) -> Self;
    pub const fn fract(self) -> Self;
    pub const fn round(self) -> Self;
    pub const fn round_ties_even(self) -> Self;
    // ...
}

Steps / History

Unresolved Questions

Footnotes

Footnotes

  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCS-tracking-unimplementedStatus: The feature has not been implemented.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions