pub enum Float {
F16,
F32,
F64,
F80,
F128,
}Expand description
A floating point format, named by its width in bits.
The names are the widths because that is what the textual form uses, and a reader who sees
f80 should not have to know that it occupies sixteen bytes on the stack. That is a layout
question and it belongs to the target, not to the type.
Variants§
F16
IEEE binary16, which is _Float16 and __fp16.
F32
IEEE binary32, which is float everywhere we care about.
F64
IEEE binary64, which is double.
F80
The x87 80-bit extended format, which is long double on x86 SysV.
F128
IEEE binary128, which is _Float128, and long double on AArch64 Linux.
Implementations§
Trait Implementations§
impl Copy for Float
impl Eq for Float
Source§impl Ord for Float
impl Ord for Float
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Float
impl PartialOrd for Float
impl StructuralPartialEq for Float
Auto Trait Implementations§
impl Freeze for Float
impl RefUnwindSafe for Float
impl Send for Float
impl Sync for Float
impl Unpin for Float
impl UnsafeUnpin for Float
impl UnwindSafe for Float
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more