Skip to content

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

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

Open
2 of 5 tasks
ruancomelli opened this issue May 25, 2025 · 0 comments
Open
2 of 5 tasks

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

ruancomelli opened this issue May 25, 2025 · 0 comments
Labels
C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC S-tracking-unimplemented Status: The feature has not been implemented. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@ruancomelli
Copy link
Contributor

ruancomelli commented May 25, 2025

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

@ruancomelli ruancomelli added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC S-tracking-unimplemented Status: The feature has not been implemented. labels May 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC S-tracking-unimplemented Status: The feature has not been implemented. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

1 participant