Closed as duplicate of#136469
Description
Feature gate: #![feature(float_algebraic)]
This is a tracking issue for exposing core::intrinsics::f*_algebraic
in stable Rust.
Public API
// core::num::f32
impl f32 {
pub fn add_algebraic(self, rhs: f32) -> f32;
pub fn sub_algebraic(self, rhs: f32) -> f32;
pub fn mul_algebraic(self, rhs: f32) -> f32;
pub fn div_algebraic(self, rhs: f32) -> f32;
pub fn rem_algebraic(self, rhs: f32) -> f32;
}
// core::num::f64
impl f64 {
pub fn add_algebraic(self, rhs: f64) -> f64;
pub fn sub_algebraic(self, rhs: f64) -> f64;
pub fn mul_algebraic(self, rhs: f64) -> f64;
pub fn div_algebraic(self, rhs: f64) -> f64;
pub fn rem_algebraic(self, rhs: f64) -> f64;
}
Steps / History
- Implementation: Expose algebraic floating point intrinsics #136457
- Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- None yet.
References
- Expose algebraic floating point intrinsics #136457
- Imprecise floating point operations (fast-math) #21690
- https://github.com/calder/dot-bench
- https://www.felixcloutier.com/x86/vfmadd132ps:vfmadd213ps:vfmadd231ps