Struct efloat::EFloat32
[−]
[src]
pub struct EFloat32 { /* fields omitted */ }
This is a floating point type that remembers how far off it might be from the actual precise value, based on it's history. It keeps and upper and lower error bound internally, and you can check those with function calls.
Methods
impl EFloat32
[src]
pub fn new(v: f32) -> EFloat32
[src]
pub fn new_with_err(v: f32, err: f32) -> EFloat32
[src]
pub fn new_with_precise_err(v: f32, p: f64, err: f32) -> EFloat32
[src]
pub fn check(&self)
[src]
pub fn value(&self) -> f32
[src]
pub fn upper_bound(&self) -> f32
[src]
pub fn lower_bound(&self) -> f32
[src]
pub fn absolute_error(&self) -> f32
[src]
pub fn relative_error(&self) -> f32
[src]
pub fn precise(&self) -> f64
[src]
pub fn sqrt(&self) -> EFloat32
[src]
pub fn abs(&self) -> EFloat32
[src]
Trait Implementations
impl Debug for EFloat32
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for EFloat32
[src]
fn clone(&self) -> EFloat32
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Add for EFloat32
[src]
type Output = EFloat32
The resulting type after applying the +
operator.
fn add(self, other: EFloat32) -> EFloat32
[src]
Performs the +
operation.
impl Sub for EFloat32
[src]
type Output = EFloat32
The resulting type after applying the -
operator.
fn sub(self, other: EFloat32) -> EFloat32
[src]
Performs the -
operation.
impl Mul for EFloat32
[src]
type Output = EFloat32
The resulting type after applying the *
operator.
fn mul(self, other: EFloat32) -> EFloat32
[src]
Performs the *
operation.
impl Div for EFloat32
[src]
type Output = EFloat32
The resulting type after applying the /
operator.
fn div(self, other: EFloat32) -> EFloat32
[src]
Performs the /
operation.
impl Neg for EFloat32
[src]
type Output = EFloat32
The resulting type after applying the -
operator.
fn neg(self) -> EFloat32
[src]
Performs the unary -
operation.