[go: up one dir, main page]

float16 0.1.5

Half-precision floating point f16 and bf16 types for Rust implementing the IEEE 754-2008 standard binary16 and bfloat16 types.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Error type for numeric conversion functions.

use core::fmt;

/// The error type returned when a checked integral type conversion fails.
pub struct TryFromFloatError(pub(crate) ());

impl fmt::Display for TryFromFloatError {
    #[inline]
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        let msg = "out of range integral type conversion attempted";
        fmt::Display::fmt(msg, f)
    }
}