Skip to content

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

@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-langRelevant to the language teamT-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.final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions