Primitive Type f128
f128 #116909)Expand description
A 128-bit floating-point type (specifically, the “binary128” type defined in IEEE 754-2008).
This type is very similar to f32 and f64, but has increased precision by using twice
as many bits as f64. Please see the documentation for f32 or Wikipedia on
quad-precision values for more information.
Note that no platforms have hardware support for f128 without enabling target specific features,
as for all instruction set architectures f128 is considered an optional feature. Only Power ISA
(“PowerPC”) and RISC-V (via the Q extension) specify it, and only certain microarchitectures
actually implement it. For x86-64 and AArch64, ISA support is not even specified, so it will always
be a software implementation significantly slower than f64.
Note: f128 support is incomplete. Many platforms will not be able to link math functions. On
x86 in particular, these functions do link but their results are always incorrect.
Trait Implementations§
1.22.0 (const: unstable) · Source§impl AddAssign<&f128> for f128
impl AddAssign<&f128> for f128
Source§fn add_assign(&mut self, other: &f128)
fn add_assign(&mut self, other: &f128)
+= operation. Read more1.8.0 (const: unstable) · Source§impl AddAssign for f128
impl AddAssign for f128
Source§fn add_assign(&mut self, other: f128)
fn add_assign(&mut self, other: f128)
+= operation. Read more1.22.0 (const: unstable) · Source§impl DivAssign<&f128> for f128
impl DivAssign<&f128> for f128
Source§fn div_assign(&mut self, other: &f128)
fn div_assign(&mut self, other: &f128)
/= operation. Read more1.8.0 (const: unstable) · Source§impl DivAssign for f128
impl DivAssign for f128
Source§fn div_assign(&mut self, other: f128)
fn div_assign(&mut self, other: f128)
/= operation. Read more1.22.0 (const: unstable) · Source§impl MulAssign<&f128> for f128
impl MulAssign<&f128> for f128
Source§fn mul_assign(&mut self, other: &f128)
fn mul_assign(&mut self, other: &f128)
*= operation. Read more1.8.0 (const: unstable) · Source§impl MulAssign for f128
impl MulAssign for f128
Source§fn mul_assign(&mut self, other: f128)
fn mul_assign(&mut self, other: f128)
*= operation. Read more1.0.0 (const: unstable) · Source§impl PartialOrd for f128
impl PartialOrd for f128
1.0.0 (const: unstable) · Source§impl Rem for f128
The remainder from the division of two floats.
impl Rem for f128
The remainder from the division of two floats.
The remainder has the same sign as the dividend and is computed as:
x - (x / y).trunc() * y.
§Examples
1.22.0 (const: unstable) · Source§impl RemAssign<&f128> for f128
impl RemAssign<&f128> for f128
Source§fn rem_assign(&mut self, other: &f128)
fn rem_assign(&mut self, other: &f128)
%= operation. Read more1.8.0 (const: unstable) · Source§impl RemAssign for f128
impl RemAssign for f128
Source§fn rem_assign(&mut self, other: f128)
fn rem_assign(&mut self, other: f128)
%= operation. Read more1.22.0 (const: unstable) · Source§impl SubAssign<&f128> for f128
impl SubAssign<&f128> for f128
Source§fn sub_assign(&mut self, other: &f128)
fn sub_assign(&mut self, other: &f128)
-= operation. Read more1.8.0 (const: unstable) · Source§impl SubAssign for f128
impl SubAssign for f128
Source§fn sub_assign(&mut self, other: f128)
fn sub_assign(&mut self, other: f128)
-= operation. Read more