Closed
Description
Feature gate: #![feature(float_next_up_down)]
This is a tracking issue for two argumentless methods to f32/f64, next_up and next_down. These functions are specified in the IEEE 754 standard, and provide the capability to enumerate floating point values in order.
Public API
impl f32 {
pub const fn next_up(self) -> Self;
pub const fn next_down(self) -> Self;
}
impl f64 {
pub const fn next_up(self) -> Self;
pub const fn next_down(self) -> Self;
}
// Type is unstable
impl f16 {
pub const fn next_up(self) -> Self;
pub const fn next_down(self) -> Self;
}
// Type is unstable
impl f128 {
pub const fn next_up(self) -> Self;
pub const fn next_down(self) -> Self;
}
Steps / History
- Implementation: Add next_up and next_down for f32/f64 - take 2 #100578
- Final comment period (FCP)
- Stabilization PR
Unresolved Questions
- Dealing with misbehaving platforms Tracking Issue for
float_next_up_down
#91399 (comment)
Metadata
Metadata
Assignees
Labels
Area: Floating point numbers and arithmeticBlocker: Approved by a merged RFC and implemented but not stabilized.Blocker: Implemented in the nightly compiler and unstable.Category: 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.