Skip to main content

FilterBound

Struct FilterBound 

Source
pub struct FilterBound {
    pub degree: u32,
    pub epsilon_in_u: String,
    pub kappa_exact: String,
    pub products: u32,
    /* private fields */
}
Expand description

The exact error bound of the f64 evaluation of a difference form.

For a call, let delta be the largest magnitude of the computed leaves (the differences of the coordinates of the approximations of the points), E the sum of the two largest errors of the approximations, and D = delta + E. The f64 value of the form differs from the exact value at the exact points by at most (epsilon * D + kappa * E) * D^(k - 1), where k is the degree, as long as no product underflows; see FilterBound::constants for the range in which underflow and overflow are accounted for.

Fields§

§degree: u32

The degree k of the form in the differences.

§epsilon_in_u: String

epsilon / u, with u = 2^-53, as an exact fraction.

§kappa_exact: String

kappa as an exact fraction.

§products: u32

The number of products N in the form; a product used several times is counted once.

Implementations§

Source§

impl FilterBound

Source

pub fn epsilon_is_u_times(&self, n: u64) -> bool

Whether n u <= epsilon < n u (1 + 2^-40), exactly.

The exact epsilon is slightly above an integer multiple of u, because of the terms in u^2 and beyond.

Source

pub fn kappa_is(&self, n: u64) -> bool

Whether n <= kappa < n (1 + 2^-40), exactly.

Source

pub fn constants(&self) -> FilterConstants

The constants of the filter.

epsilon and kappa are the exact values times 1 + 2^-30, rounded up; the inflation covers the rounding of the evaluation of the bound itself and an allowance for products that underflow. d_min is the smallest power of two below 1 for which that allowance covers underflow and the bound stays a normal number, and d_max the largest above 1 for which no computed node exceeds 2^1022; both exist, or filter_bound would have returned an error.

Trait Implementations§

Source§

impl Clone for FilterBound

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FilterBound

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.