pub enum BitRoundMode {
Keepbits {
keepbits: u8,
},
AbsoluteError {
eb_abs: NonNegative<f64>,
},
RelativeError {
eb_rel: NonNegative<f64>,
},
}Expand description
Bit rounding mode
Variants§
Keepbits
Directly specify the number of bits of the mantissa to keep.
Fields
AbsoluteError
Pointwise absolute error.
Fields
§
eb_abs: NonNegative<f64>The pointwise absolute error bound to preserve.
This error bound guarantees that
$|x - \hat{x}| \leq \epsilon_{abs}$.
RelativeError
Pointwise relative error.
Fields
§
eb_rel: NonNegative<f64>The pointwise relative error bound to preserve.
This error bound guarantees that
$|x - \hat{x}| \leq |x| \cdot \epsilon_{rel}$.
Trait Implementations§
Source§impl Clone for BitRoundMode
impl Clone for BitRoundMode
Source§fn clone(&self) -> BitRoundMode
fn clone(&self) -> BitRoundMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BitRoundMode
Source§impl<'de> Deserialize<'de> for BitRoundMode
impl<'de> Deserialize<'de> for BitRoundMode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for BitRoundMode
impl JsonSchema for BitRoundMode
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for BitRoundMode
impl PartialEq for BitRoundMode
Source§fn eq(&self, other: &BitRoundMode) -> bool
fn eq(&self, other: &BitRoundMode) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for BitRoundMode
impl Serialize for BitRoundMode
impl StructuralPartialEq for BitRoundMode
Auto Trait Implementations§
impl Freeze for BitRoundMode
impl RefUnwindSafe for BitRoundMode
impl Send for BitRoundMode
impl Sync for BitRoundMode
impl Unpin for BitRoundMode
impl UnsafeUnpin for BitRoundMode
impl UnwindSafe for BitRoundMode
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