View all comments
Feature gate: #![feature(float_algebraic)]
This is a tracking issue for exposing core::intrinsics::f*_algebraic in stable Rust, including in const.
Public API
// core::num::f16
impl f16 {
pub const fn algebraic_add(self, rhs: f16) -> f16;
pub const fn algebraic_sub(self, rhs: f16) -> f16;
pub const fn algebraic_mul(self, rhs: f16) -> f16;
pub const fn algebraic_div(self, rhs: f16) -> f16;
pub const fn algebraic_rem(self, rhs: f16) -> f16;
}
// core::num::f32
impl f32 {
pub const fn algebraic_add(self, rhs: f32) -> f32;
pub const fn algebraic_sub(self, rhs: f32) -> f32;
pub const fn algebraic_mul(self, rhs: f32) -> f32;
pub const fn algebraic_div(self, rhs: f32) -> f32;
pub const fn algebraic_rem(self, rhs: f32) -> f32;
}
// core::num::f64
impl f64 {
pub const fn algebraic_add(self, rhs: f64) -> f64;
pub const fn algebraic_sub(self, rhs: f64) -> f64;
pub const fn algebraic_mul(self, rhs: f64) -> f64;
pub const fn algebraic_div(self, rhs: f64) -> f64;
pub const fn algebraic_rem(self, rhs: f64) -> f64;
}
// core::num::f128
impl f128 {
pub const fn algebraic_add(self, rhs: f128) -> f128;
pub const fn algebraic_sub(self, rhs: f128) -> f128;
pub const fn algebraic_mul(self, rhs: f128) -> f128;
pub const fn algebraic_div(self, rhs: f128) -> f128;
pub const fn algebraic_rem(self, rhs: f128) -> f128;
}
Steps / History
Unresolved Questions
References
cc @rust-lang/lang @rust-lang/libs-api
View all comments
Feature gate:
#![feature(float_algebraic)]This is a tracking issue for exposing
core::intrinsics::f*_algebraicin stable Rust, including in const.Public API
Steps / History
Unresolved Questions
References
cc @rust-lang/lang @rust-lang/libs-api
Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩