RealValidated

Struct RealValidated 

Source
pub struct RealValidated<K: NumKernel> { /* private fields */ }
Expand description

A validated real number that is guaranteed to conform to a specific NumKernel.

Trait Implementations§

Source§

impl<K: NumKernel> ACos for RealValidated<K>

Source§

type Error = FunctionErrors<ACosRealInputErrors<<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value>, <<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value as RawScalarTrait>::ValidationErrors>

The error type that is returned by the try_acos method.
Source§

fn try_acos(self) -> Result<Self, Self::Error>

Computes the inverse cosine of self and returns a Result. Read more
Source§

fn acos(self) -> Self

Computes and returns the inverse cosine of self. Read more
Source§

impl<K: NumKernel> ACosH for RealValidated<K>

Source§

type Error = FunctionErrors<ACosHInputErrors<<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value>, <<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value as RawScalarTrait>::ValidationErrors>

The error type that is returned by the try_acosh method.
Source§

fn try_acosh(self) -> Result<Self, Self::Error>

Computes the inverse hyperbolic cosine of self and returns a Result. Read more
Source§

fn acosh(self) -> Self

Computes and returns the inverse hyperbolic cosine of self. Read more
Source§

impl<K: NumKernel> ASin for RealValidated<K>

Source§

type Error = FunctionErrors<ASinRealInputErrors<<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value>, <<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value as RawScalarTrait>::ValidationErrors>

The error type that is returned by the try_asin method.
Source§

fn try_asin(self) -> Result<Self, Self::Error>

Computes the inverse sine of self and returns a Result. Read more
Source§

fn asin(self) -> Self

Computes and returns the inverse sine of self. Read more
Source§

impl<K: NumKernel> ASinH for RealValidated<K>

Source§

type Error = FunctionErrors<ASinHInputErrors<<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value>, <<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value as RawScalarTrait>::ValidationErrors>

The error type that is returned by the try_asinh method.
Source§

fn try_asinh(self) -> Result<Self, Self::Error>

Computes the inverse hyperbolic sine of self and returns a Result. Read more
Source§

fn asinh(self) -> Self

Computes and returns the inverse hyperbolic sine of self. Read more
Source§

impl<K: NumKernel> ATan for RealValidated<K>

Source§

type Error = FunctionErrors<ATanRealInputErrors<<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value>, <<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value as RawScalarTrait>::ValidationErrors>

The error type that is returned by the try_atan method.
Source§

fn try_atan(self) -> Result<Self, Self::Error>

Computes the inverse tangent of self and returns a Result. Read more
Source§

fn atan(self) -> Self

Computes and returns the inverse tangent of self. Read more
Source§

impl<K: NumKernel> ATan2 for RealValidated<K>

Source§

type Error = FunctionErrors<ATan2InputErrors<<K as RawKernel>::RawReal>, <<K as RawKernel>::RawReal as RawScalarTrait>::ValidationErrors>

The error type that is returned by the try_atan2 method.
Source§

fn try_atan2(self, denominator: &Self) -> Result<Self, Self::Error>

Computes the arctangent of self (numerator y) and denominator (x), returning a Result. Read more
Source§

fn atan2(self, denominator: &Self) -> Self

Computes the arctangent of self (numerator y) and denominator (x), returning the result directly.
Source§

impl<K: NumKernel> ATanH for RealValidated<K>

Source§

type Error = FunctionErrors<ATanHInputErrors<<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value>, <<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value as RawScalarTrait>::ValidationErrors>

The error type that is returned by the try_atanh method.
Source§

fn try_atanh(self) -> Result<Self, Self::Error>

Computes the inverse hyperbolic tangent of self and returns a Result. Read more
Source§

fn atanh(self) -> Self

Computes and returns the inverse hyperbolic tangent of self. Read more
Source§

impl<K: NumKernel> Abs for RealValidated<K>

Source§

fn abs(self) -> Self::Output

Returns the absolute value of self.

Source§

type Output = RealValidated<K>

The output type of the absolute value function. Read more
Source§

type Error = FunctionErrors<AbsInputErrors<<<K as NumKernel>::RealPolicy as ValidationPolicy>::Value>, <<<K as NumKernel>::RealPolicy as ValidationPolicy>::Value as RawScalarTrait>::ValidationErrors>

The error type that can be returned by the try_abs method. Read more
Source§

fn try_abs(self) -> Result<Self::Output, Self::Error>

Attempts to compute the absolute value of self.
Source§

impl<'a, K: NumKernel> Add<&'a RealValidated<K>> for ComplexValidated<K>

Source§

type Output = ComplexValidated<K>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &'a RealValidated<K>) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, K: NumKernel> Add<&'a RealValidated<K>> for RealValidated<K>

Source§

type Output = RealValidated<K>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &'a Self) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, K: NumKernel> Add<RealValidated<K>> for &'a RealValidated<K>

Source§

type Output = RealValidated<K>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: RealValidated<K>) -> Self::Output

Performs the + operation. Read more
Source§

impl<K: NumKernel> Add<RealValidated<K>> for ComplexValidated<K>

Source§

type Output = ComplexValidated<K>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: RealValidated<K>) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, K: NumKernel> Add for &'a RealValidated<K>

Source§

type Output = RealValidated<K>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &'a RealValidated<K>) -> Self::Output

Performs the + operation. Read more
Source§

impl<K: NumKernel> Add for RealValidated<K>

Source§

type Output = RealValidated<K>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, K: NumKernel> AddAssign<&'a RealValidated<K>> for ComplexValidated<K>

Source§

fn add_assign(&mut self, rhs: &'a RealValidated<K>)

Performs the += operation. Read more
Source§

impl<'a, K: NumKernel> AddAssign<&'a RealValidated<K>> for RealValidated<K>

Source§

fn add_assign(&mut self, rhs: &'a Self)

Performs the += operation. Read more
Source§

impl<K: NumKernel> AddAssign<RealValidated<K>> for ComplexValidated<K>

Source§

fn add_assign(&mut self, rhs: RealValidated<K>)

Performs the += operation. Read more
Source§

impl<K: NumKernel> AddAssign for RealValidated<K>

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl<K: NumKernel> AsRef<<K as RawKernel>::RawReal> for RealValidated<K>

Source§

fn as_ref(&self) -> &K::RawReal

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<K: NumKernel> Clamp for RealValidated<K>

Source§

fn kernel_clamp(self, min: &Self, max: &Self) -> Self

Clamps the value within the specified bounds.

Source§

impl<K: NumKernel> Classify for RealValidated<K>

Source§

fn kernel_classify(&self) -> FpCategory

Returns the floating point category of the number. If only one property is going to be tested, it is generally faster to use the specific predicate instead.

use num_valid::{
    functions::Classify,
    kernels::native64_validated::RealNative64StrictFinite,
};
use std::num::FpCategory;
use try_create::TryNew;

let num = RealNative64StrictFinite::try_new(12.4).unwrap();

assert_eq!(num.kernel_classify(), FpCategory::Normal);
Source§

impl<K: NumKernel> Clone for RealValidated<K>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<K: NumKernel> Constants for RealValidated<K>

Source§

fn pi() -> Self

Build and return the (floating point) value π represented by the proper type.
Source§

fn two_pi() -> Self

Build and return the (floating point) value 2 π represented by the proper type.
Source§

fn pi_div_2() -> Self

Build and return the (floating point) value π/2 represented by the proper type.
Source§

fn one_div_2() -> Self

Build and return the (floating point) value 0.5 represented by the proper type.
Source§

fn two() -> Self

Build and return the (floating point) value 2. represented by the proper type.
Source§

fn max_finite() -> Self

Build and return the maximum finite value allowed by the current floating point representation.
Source§

fn min_finite() -> Self

Build and return the minimum finite (i.e., the most negative) value allowed by the current floating point representation.
Source§

fn epsilon() -> Self

Machine epsilon value for Self. Read more
Source§

fn negative_one() -> Self

Build and return the (floating point) value -1. represented by the proper type.
Source§

fn ln_2() -> Self

Build and return the natural logarithm of 2, i.e. the (floating point) value ln(2), represented by the proper type.
Source§

fn ln_10() -> Self

Build and return the natural logarithm of 10, i.e. the (floating point) value ln(10), represented by the proper type.
Source§

fn log2_e() -> Self

Build and return the base-2 logarithm of e, i.e. the (floating point) value Log_2(e), represented by the proper type.
Source§

fn log10_e() -> Self

Build and return the base-10 logarithm of e, i.e. the (floating point) value Log_10(e), represented by the proper type.
Source§

fn e() -> Self

Build and return the (floating point) value e represented by the proper type.
Source§

fn log2_10() -> Self

Build and return the base-2 logarithm of 10, i.e. the (floating point) value Log_2(10), represented by the proper type.
Source§

fn log10_2() -> Self

Build and return the base-10 logarithm of 2, i.e. the (floating point) value Log_10(2), represented by the proper type.
Source§

impl<K: NumKernel> Cos for RealValidated<K>

Source§

type Error = FunctionErrors<CosInputErrors<<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value>, <<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value as RawScalarTrait>::ValidationErrors>

The error type that is returned by the try_cos method.
Source§

fn try_cos(self) -> Result<Self, Self::Error>

Computes the cosine of self and returns a Result. Read more
Source§

fn cos(self) -> Self

Computes and returns the cosine of self. Read more
Source§

impl<K: NumKernel> CosH for RealValidated<K>

Source§

type Error = FunctionErrors<CosHInputErrors<<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value>, <<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value as RawScalarTrait>::ValidationErrors>

The error type that is returned by the try_cosh method.
Source§

fn try_cosh(self) -> Result<Self, Self::Error>

Computes the hyperbolic cosine of self and returns a Result. Read more
Source§

fn cosh(self) -> Self

Computes and returns the hyperbolic cosine of self. Read more
Source§

impl<K: NumKernel> Debug for RealValidated<K>
where K::RawReal: Debug, PhantomData<K>: Debug,

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<K: NumKernel> Display for RealValidated<K>
where K::RawReal: Display,

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<K: NumKernel> Distribution<RealValidated<K>> for StandardUniform

Implement the Distribution trait for RealValidated type using the StandardUniform distribution.

Source§

fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> RealValidated<K>

Generate a random value of T, using rng as the source of randomness.
Source§

fn sample_iter<R>(self, rng: R) -> Iter<Self, R, T>
where R: Rng, Self: Sized,

Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Source§

fn map<F, S>(self, func: F) -> Map<Self, F, T, S>
where F: Fn(T) -> S, Self: Sized,

Map sampled values to type S Read more
Source§

impl<'a, K: NumKernel> Div<&'a RealValidated<K>> for ComplexValidated<K>

Source§

type Output = ComplexValidated<K>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &'a RealValidated<K>) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a, K: NumKernel> Div<&'a RealValidated<K>> for RealValidated<K>

Source§

type Output = RealValidated<K>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &'a Self) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a, K: NumKernel> Div<RealValidated<K>> for &'a RealValidated<K>

Source§

type Output = RealValidated<K>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: RealValidated<K>) -> Self::Output

Performs the / operation. Read more
Source§

impl<K: NumKernel> Div<RealValidated<K>> for ComplexValidated<K>

Source§

type Output = ComplexValidated<K>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: RealValidated<K>) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a, K: NumKernel> Div for &'a RealValidated<K>

Source§

type Output = RealValidated<K>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &'a RealValidated<K>) -> Self::Output

Performs the / operation. Read more
Source§

impl<K: NumKernel> Div for RealValidated<K>

Source§

type Output = RealValidated<K>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a, K: NumKernel> DivAssign<&'a RealValidated<K>> for ComplexValidated<K>

Source§

fn div_assign(&mut self, rhs: &'a RealValidated<K>)

Performs the /= operation. Read more
Source§

impl<'a, K: NumKernel> DivAssign<&'a RealValidated<K>> for RealValidated<K>

Source§

fn div_assign(&mut self, rhs: &'a Self)

Performs the /= operation. Read more
Source§

impl<K: NumKernel> DivAssign<RealValidated<K>> for ComplexValidated<K>

Source§

fn div_assign(&mut self, rhs: RealValidated<K>)

Performs the /= operation. Read more
Source§

impl<K: NumKernel> DivAssign for RealValidated<K>

Source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
Source§

impl<K: NumKernel> Exp for RealValidated<K>

Source§

type Error = FunctionErrors<ExpInputErrors<<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value>, <<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value as RawScalarTrait>::ValidationErrors>

The error type that can be returned by the try_exp method. Read more
Source§

fn try_exp(self) -> Result<Self, Self::Error>

Attempts to compute the exponential of self (e^self), returning a Result.
Source§

fn exp(self) -> Self

Computes and returns the exponential of self.
Source§

impl<K: NumKernel> ExpM1 for RealValidated<K>

Source§

fn kernel_exp_m1(self) -> Self

Returns `e^(self) - 1`` in a way that is accurate even if the number is close to zero.

Source§

impl<K: NumKernel> FpChecks for RealValidated<K>

Source§

fn is_finite(&self) -> bool

Returns true if self is neither infinite nor NaN.

Source§

fn is_infinite(&self) -> bool

Returns true if self is positive infinity or negative infinity, and false otherwise.

Source§

fn is_nan(&self) -> bool

Returns true if self is NaN.

Source§

fn is_normal(&self) -> bool

Returns true if self is normal (i.e. neither zero, infinite, subnormal, or NaN).

Source§

impl<K: NumKernel> FpScalar for RealValidated<K>

Source§

type Kind = Real

The kind of scalar this is, e.g., Real or Complex. This is a sealed trait to prevent external implementations.
Source§

type RealType = RealValidated<K>

The real number type corresponding to this scalar. Read more
Source§

impl<K: NumKernel> Hypot for RealValidated<K>

Source§

fn kernel_hypot(self, other: &Self) -> Self

Compute the distance between the origin and a point (self, other) on the Euclidean plane. Equivalently, compute the length of the hypotenuse of a right-angle triangle with other sides having length self.abs() and other.abs().

Source§

impl<K: NumKernel> IntoInner for RealValidated<K>

Source§

type InnerType = <K as RawKernel>::RawReal

The type of the inner value that will be extracted.
Source§

fn into_inner(self) -> Self::InnerType

Consumes the wrapper and returns the inner value.
Source§

impl<K: NumKernel> Ln for RealValidated<K>

Source§

type Error = FunctionErrors<LogarithmRealInputErrors<<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value>, <<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value as RawScalarTrait>::ValidationErrors>

The error type that is returned by the try_ln method.
Source§

fn try_ln(self) -> Result<Self, Self::Error>

Computes the natural logarithm of self and returns a Result. Read more
Source§

fn ln(self) -> Self

Computes the natural logarithm of self and directly returns the computed value. Read more
Source§

impl<K: NumKernel> Ln1p for RealValidated<K>

Source§

fn kernel_ln_1p(self) -> Self

Returns ln(1. + self) (natural logarithm) more accurately than if the operations were performed separately.

Source§

impl<K: NumKernel> Log10 for RealValidated<K>

Source§

type Error = FunctionErrors<LogarithmRealInputErrors<<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value>, <<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value as RawScalarTrait>::ValidationErrors>

The error type that is returned by the try_log10 method.
Source§

fn try_log10(self) -> Result<Self, Self::Error>

Computes the base-10 logarithm of self and returns a Result. Read more
Source§

fn log10(self) -> Self

Computes the base-10 logarithm of self and directly returns the computed value. Read more
Source§

impl<K: NumKernel> Log2 for RealValidated<K>

Source§

type Error = FunctionErrors<LogarithmRealInputErrors<<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value>, <<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value as RawScalarTrait>::ValidationErrors>

The error type that is returned by the try_log2 method.
Source§

fn try_log2(self) -> Result<Self, Self::Error>

Computes the base-2 logarithm of self and returns a Result. Read more
Source§

fn log2(self) -> Self

Computes the base-2 logarithm of self and directly returns the computed value. Read more
Source§

impl<K: NumKernel> LowerExp for RealValidated<K>
where K::RawReal: Display,

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<K: NumKernel> Max for RealValidated<K>

Source§

fn max<'a>(&'a self, other: &'a Self) -> &'a Self

Returns a reference to the maximum of self and other. Read more
Source§

fn max_by_value(self, other: Self) -> Self

Returns the maximum of self and other, consuming both values. Read more
Source§

impl<K: NumKernel> Min for RealValidated<K>

Source§

fn min<'a>(&'a self, other: &'a Self) -> &'a Self

Returns a reference to the minimum of self and other. Read more
Source§

fn min_by_value(self, other: Self) -> Self

Returns the minimum of self and other, consuming both values. Read more
Source§

impl<'a, K: NumKernel> Mul<&'a RealValidated<K>> for ComplexValidated<K>

Source§

type Output = ComplexValidated<K>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a RealValidated<K>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, K: NumKernel> Mul<&'a RealValidated<K>> for RealValidated<K>

Source§

type Output = RealValidated<K>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a Self) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, K: NumKernel> Mul<ComplexValidated<K>> for &'a RealValidated<K>

Source§

type Output = ComplexValidated<K>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: ComplexValidated<K>) -> Self::Output

Performs the * operation. Read more
Source§

impl<K: NumKernel> Mul<ComplexValidated<K>> for RealValidated<K>

Source§

type Output = ComplexValidated<K>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: ComplexValidated<K>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, K: NumKernel> Mul<RealValidated<K>> for &'a RealValidated<K>

Source§

type Output = RealValidated<K>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: RealValidated<K>) -> Self::Output

Performs the * operation. Read more
Source§

impl<K: NumKernel> Mul<RealValidated<K>> for ComplexValidated<K>

Source§

type Output = ComplexValidated<K>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: RealValidated<K>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, K: NumKernel> Mul for &'a RealValidated<K>

Source§

type Output = RealValidated<K>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a RealValidated<K>) -> Self::Output

Performs the * operation. Read more
Source§

impl<K: NumKernel> Mul for RealValidated<K>

Source§

type Output = RealValidated<K>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Self) -> Self::Output

Performs the * operation. Read more
Source§

impl<K: NumKernel> MulAddRef for RealValidated<K>

Source§

fn mul_add_ref(self, b: &Self, c: &Self) -> Self

Multiplies and adds in one fused operation, rounding to the nearest with only one rounding error.

a.mul_add(b, c) produces a result like a * &b + &c.

Source§

impl<'a, K: NumKernel> MulAssign<&'a RealValidated<K>> for ComplexValidated<K>

Source§

fn mul_assign(&mut self, rhs: &'a RealValidated<K>)

Performs the *= operation. Read more
Source§

impl<'a, K: NumKernel> MulAssign<&'a RealValidated<K>> for RealValidated<K>

Source§

fn mul_assign(&mut self, rhs: &'a Self)

Performs the *= operation. Read more
Source§

impl<K: NumKernel> MulAssign<RealValidated<K>> for ComplexValidated<K>

Source§

fn mul_assign(&mut self, rhs: RealValidated<K>)

Performs the *= operation. Read more
Source§

impl<K: NumKernel> MulAssign for RealValidated<K>

Source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
Source§

impl<K: NumKernel> Neg for RealValidated<K>

Source§

type Output = RealValidated<K>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<K: NumKernel> NegAssign for RealValidated<K>

Source§

fn neg_assign(&mut self)

Performs the negation of self.

Source§

impl<K: NumKernel> NeumaierAddable for RealValidated<K>

Source§

fn neumaier_compensated_sum( value: Self, sum: &mut Self, compensation: &mut Self, )

Source§

impl<K: NumKernel> New for RealValidated<K>

Source§

fn new(value: Self::InnerType) -> Self

Creates a new instance of Self from value. Read more
Source§

impl<K: NumKernel> One for RealValidated<K>

Source§

fn one() -> Self

Returns the multiplicative identity element of Self, 1. Read more
Source§

fn set_one(&mut self)

Sets self to the multiplicative identity element of Self, 1.
Source§

fn is_one(&self) -> bool
where Self: PartialEq,

Returns true if self is equal to the multiplicative identity. Read more
Source§

impl<K: NumKernel> PartialEq<f64> for RealValidated<K>

Source§

fn eq(&self, other: &f64) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<K: NumKernel> PartialEq for RealValidated<K>

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<K: NumKernel> PartialOrd<f64> for RealValidated<K>

Source§

fn partial_cmp(&self, other: &f64) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<K: NumKernel> PartialOrd for RealValidated<K>

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<K: NumKernel> Pow<&RealValidated<K>> for ComplexValidated<K>

Source§

fn pow(self, exponent: &RealValidated<K>) -> Self

Raises th number self to the power exponent.

Source§

type Error = PowComplexBaseRealExponentErrors<<K as RawKernel>::RawComplex>

The error type that can be returned by the try_pow method. This type must implement std::error::Error for proper error handling.
Source§

fn try_pow(self, exponent: &RealValidated<K>) -> Result<Self, Self::Error>

Attempts to compute self (the base) raised to the power of exponent. Read more
Source§

impl<K: NumKernel> Pow<&RealValidated<K>> for RealValidated<K>

Source§

fn pow(self, exponent: &Self) -> Self

Raises th number self to the power exponent.

Source§

type Error = PowRealBaseRealExponentErrors<<K as RawKernel>::RawReal>

The error type that can be returned by the try_pow method. This type must implement std::error::Error for proper error handling.
Source§

fn try_pow(self, exponent: &Self) -> Result<Self, Self::Error>

Attempts to compute self (the base) raised to the power of exponent. Read more
Source§

impl<K: NumKernel> Pow<i128> for RealValidated<K>

Source§

fn pow(self, exponent: i128) -> Self

Raises th number self to the power exponent.

Source§

type Error = FunctionErrors<PowIntExponentInputErrors<<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value, i128>, <<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value as RawScalarTrait>::ValidationErrors>

The error type that can be returned by the try_pow method. This type must implement std::error::Error for proper error handling.
Source§

fn try_pow(self, exponent: i128) -> Result<Self, Self::Error>

Attempts to compute self (the base) raised to the power of exponent. Read more
Source§

impl<K: NumKernel> Pow<i16> for RealValidated<K>

Source§

fn pow(self, exponent: i16) -> Self

Raises th number self to the power exponent.

Source§

type Error = FunctionErrors<PowIntExponentInputErrors<<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value, i16>, <<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value as RawScalarTrait>::ValidationErrors>

The error type that can be returned by the try_pow method. This type must implement std::error::Error for proper error handling.
Source§

fn try_pow(self, exponent: i16) -> Result<Self, Self::Error>

Attempts to compute self (the base) raised to the power of exponent. Read more
Source§

impl<K: NumKernel> Pow<i32> for RealValidated<K>

Source§

fn pow(self, exponent: i32) -> Self

Raises th number self to the power exponent.

Source§

type Error = FunctionErrors<PowIntExponentInputErrors<<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value, i32>, <<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value as RawScalarTrait>::ValidationErrors>

The error type that can be returned by the try_pow method. This type must implement std::error::Error for proper error handling.
Source§

fn try_pow(self, exponent: i32) -> Result<Self, Self::Error>

Attempts to compute self (the base) raised to the power of exponent. Read more
Source§

impl<K: NumKernel> Pow<i64> for RealValidated<K>

Source§

fn pow(self, exponent: i64) -> Self

Raises th number self to the power exponent.

Source§

type Error = FunctionErrors<PowIntExponentInputErrors<<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value, i64>, <<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value as RawScalarTrait>::ValidationErrors>

The error type that can be returned by the try_pow method. This type must implement std::error::Error for proper error handling.
Source§

fn try_pow(self, exponent: i64) -> Result<Self, Self::Error>

Attempts to compute self (the base) raised to the power of exponent. Read more
Source§

impl<K: NumKernel> Pow<i8> for RealValidated<K>

Source§

fn pow(self, exponent: i8) -> Self

Raises th number self to the power exponent.

Source§

type Error = FunctionErrors<PowIntExponentInputErrors<<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value, i8>, <<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value as RawScalarTrait>::ValidationErrors>

The error type that can be returned by the try_pow method. This type must implement std::error::Error for proper error handling.
Source§

fn try_pow(self, exponent: i8) -> Result<Self, Self::Error>

Attempts to compute self (the base) raised to the power of exponent. Read more
Source§

impl<K: NumKernel> Pow<isize> for RealValidated<K>

Source§

fn pow(self, exponent: isize) -> Self

Raises th number self to the power exponent.

Source§

type Error = FunctionErrors<PowIntExponentInputErrors<<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value, isize>, <<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value as RawScalarTrait>::ValidationErrors>

The error type that can be returned by the try_pow method. This type must implement std::error::Error for proper error handling.
Source§

fn try_pow(self, exponent: isize) -> Result<Self, Self::Error>

Attempts to compute self (the base) raised to the power of exponent. Read more
Source§

impl<K: NumKernel> Pow<u128> for RealValidated<K>

Source§

fn pow(self, exponent: u128) -> Self

Raises th number self to the power exponent.

Source§

type Error = FunctionErrors<PowIntExponentInputErrors<<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value, u128>, <<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value as RawScalarTrait>::ValidationErrors>

The error type that can be returned by the try_pow method. This type must implement std::error::Error for proper error handling.
Source§

fn try_pow(self, exponent: u128) -> Result<Self, Self::Error>

Attempts to compute self (the base) raised to the power of exponent. Read more
Source§

impl<K: NumKernel> Pow<u16> for RealValidated<K>

Source§

fn pow(self, exponent: u16) -> Self

Raises th number self to the power exponent.

Source§

type Error = FunctionErrors<PowIntExponentInputErrors<<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value, u16>, <<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value as RawScalarTrait>::ValidationErrors>

The error type that can be returned by the try_pow method. This type must implement std::error::Error for proper error handling.
Source§

fn try_pow(self, exponent: u16) -> Result<Self, Self::Error>

Attempts to compute self (the base) raised to the power of exponent. Read more
Source§

impl<K: NumKernel> Pow<u32> for RealValidated<K>

Source§

fn pow(self, exponent: u32) -> Self

Raises th number self to the power exponent.

Source§

type Error = FunctionErrors<PowIntExponentInputErrors<<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value, u32>, <<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value as RawScalarTrait>::ValidationErrors>

The error type that can be returned by the try_pow method. This type must implement std::error::Error for proper error handling.
Source§

fn try_pow(self, exponent: u32) -> Result<Self, Self::Error>

Attempts to compute self (the base) raised to the power of exponent. Read more
Source§

impl<K: NumKernel> Pow<u64> for RealValidated<K>

Source§

fn pow(self, exponent: u64) -> Self

Raises th number self to the power exponent.

Source§

type Error = FunctionErrors<PowIntExponentInputErrors<<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value, u64>, <<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value as RawScalarTrait>::ValidationErrors>

The error type that can be returned by the try_pow method. This type must implement std::error::Error for proper error handling.
Source§

fn try_pow(self, exponent: u64) -> Result<Self, Self::Error>

Attempts to compute self (the base) raised to the power of exponent. Read more
Source§

impl<K: NumKernel> Pow<u8> for RealValidated<K>

Source§

fn pow(self, exponent: u8) -> Self

Raises th number self to the power exponent.

Source§

type Error = FunctionErrors<PowIntExponentInputErrors<<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value, u8>, <<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value as RawScalarTrait>::ValidationErrors>

The error type that can be returned by the try_pow method. This type must implement std::error::Error for proper error handling.
Source§

fn try_pow(self, exponent: u8) -> Result<Self, Self::Error>

Attempts to compute self (the base) raised to the power of exponent. Read more
Source§

impl<K: NumKernel> Pow<usize> for RealValidated<K>

Source§

fn pow(self, exponent: usize) -> Self

Raises th number self to the power exponent.

Source§

type Error = FunctionErrors<PowIntExponentInputErrors<<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value, usize>, <<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value as RawScalarTrait>::ValidationErrors>

The error type that can be returned by the try_pow method. This type must implement std::error::Error for proper error handling.
Source§

fn try_pow(self, exponent: usize) -> Result<Self, Self::Error>

Attempts to compute self (the base) raised to the power of exponent. Read more
Source§

impl<K: NumKernel> PowIntExponent for RealValidated<K>

Source§

impl<K> RandomSampleFromF64 for RealValidated<K>
where K: NumKernel,

Source§

fn sample_from<D, R>(dist: &D, rng: &mut R) -> Self
where D: Distribution<f64>, R: Rng + ?Sized,

Samples a single value of Self using the given f64 distribution.
Source§

fn sample_iter_from<D, R>( dist: &D, rng: &mut R, n: usize, ) -> impl Iterator<Item = Self>
where D: Distribution<f64>, R: Rng + ?Sized,

Source§

impl<K: NumKernel> RealScalar for RealValidated<K>

Source§

fn kernel_mul_add_mul_mut( &mut self, mul: &Self, add_mul1: &Self, add_mul2: &Self, )

Multiplies two products and adds them in one fused operation, rounding to the nearest with only one rounding error. a.kernel_mul_add_mul_mut(&b, &c, &d) produces a result like &a * &b + &c * &d, but stores the result in a using its precision.

Source§

fn kernel_mul_sub_mul_mut( &mut self, mul: &Self, sub_mul1: &Self, sub_mul2: &Self, )

Multiplies two products and subtracts them in one fused operation, rounding to the nearest with only one rounding error. a.kernel_mul_sub_mul_mut(&b, &c, &d) produces a result like &a * &b - &c * &d, but stores the result in a using its precision.

Source§

fn try_from_f64(value: f64) -> Result<Self, ErrorsTryFromf64<K::RawReal>>

Try to build a RealValidated instance from a f64. The returned value is Ok if the input value is valid w.r.t. the ValidationPolicy V, otherwise the returned value is ErrorsTryFromf64.

Source§

type RawReal = <K as RawKernel>::RawReal

The most fundamental, “raw” representation of this real number. Read more
Source§

impl<K: NumKernel> Reciprocal for RealValidated<K>

Source§

type Error = FunctionErrors<ReciprocalInputErrors<<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value>, <<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value as RawScalarTrait>::ValidationErrors>

The error type that can be returned by the try_reciprocal method. Read more
Source§

fn try_reciprocal(self) -> Result<Self, Self::Error>

Attempts to compute the reciprocal of self (1/self), returning a Result. Read more
Source§

fn reciprocal(self) -> Self

Returns the reciprocal of self (1/self).
Source§

impl<K: NumKernel> Rounding for RealValidated<K>

Source§

fn kernel_ceil(self) -> Self

Returns the smallest integer greater than or equal to self.

Source§

fn kernel_floor(self) -> Self

Returns the largest integer smaller than or equal to self.

Source§

fn kernel_fract(self) -> Self

Returns the fractional part of self.

Source§

fn kernel_round(self) -> Self

Rounds self to the nearest integer, rounding half-way cases away from zero.

Source§

fn kernel_round_ties_even(self) -> Self

Returns the nearest integer to a number. Rounds half-way cases to the number with an even least significant digit.

This function always returns the precise result.

§Examples
use num_valid::{
    functions::Rounding,
    RealNative64StrictFinite,
};
use try_create::TryNew;

let f = RealNative64StrictFinite::try_new(3.3).unwrap();
let g = RealNative64StrictFinite::try_new(-3.3).unwrap();
let h = RealNative64StrictFinite::try_new(3.5).unwrap();
let i = RealNative64StrictFinite::try_new(-4.5).unwrap();

assert_eq!(f.kernel_round_ties_even(), RealNative64StrictFinite::try_new(3.).unwrap());
assert_eq!(g.kernel_round_ties_even(), RealNative64StrictFinite::try_new(-3.).unwrap());
assert_eq!(h.kernel_round_ties_even(), RealNative64StrictFinite::try_new(4.).unwrap());
assert_eq!(i.kernel_round_ties_even(), RealNative64StrictFinite::try_new(-4.).unwrap());
Source§

fn kernel_trunc(self) -> Self

Returns the integer part of self. This means that non-integer numbers are always truncated towards zero.

§Examples
use num_valid::{
    functions::Rounding,
    RealNative64StrictFinite,
};
use try_create::TryNew;

let f = RealNative64StrictFinite::try_new(3.7).unwrap();
let g = RealNative64StrictFinite::try_new(3.).unwrap();
let h = RealNative64StrictFinite::try_new(-3.7).unwrap();

assert_eq!(f.kernel_trunc(), RealNative64StrictFinite::try_new(3.).unwrap());
assert_eq!(g.kernel_trunc(), RealNative64StrictFinite::try_new(3.).unwrap());
assert_eq!(h.kernel_trunc(), RealNative64StrictFinite::try_new(-3.).unwrap());
Source§

impl<K: NumKernel> Serialize for RealValidated<K>
where K::RawReal: Serialize,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<K: NumKernel> Sign for RealValidated<K>

Source§

fn kernel_is_sign_negative(&self) -> bool

Returns true if the value is negative, −0 or NaN with a negative sign.

Source§

fn kernel_is_sign_positive(&self) -> bool

Returns true if the value is positive, +0 or NaN with a positive sign.

Source§

fn kernel_copysign(self, sign: &Self) -> Self

Returns a number with the magnitude of self and the sign of sign.

Source§

fn kernel_signum(self) -> Self

Returns the signum of the number.

Source§

impl<K: NumKernel> Sin for RealValidated<K>

Source§

type Error = FunctionErrors<SinInputErrors<<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value>, <<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value as RawScalarTrait>::ValidationErrors>

The error type that is returned by the try_sin method.
Source§

fn try_sin(self) -> Result<Self, Self::Error>

Computes the sine of self and returns a Result. Read more
Source§

fn sin(self) -> Self

Computes and returns the sine of self. Read more
Source§

impl<K: NumKernel> SinH for RealValidated<K>

Source§

type Error = FunctionErrors<SinHInputErrors<<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value>, <<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value as RawScalarTrait>::ValidationErrors>

The error type that is returned by the try_sinh method.
Source§

fn try_sinh(self) -> Result<Self, Self::Error>

Computes the hyperbolic sine of self and returns a Result. Read more
Source§

fn sinh(self) -> Self

Computes and returns the hyperbolic sine of self. Read more
Source§

impl<K: NumKernel> Sqrt for RealValidated<K>

Source§

type Error = FunctionErrors<SqrtRealInputErrors<<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value>, <<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value as RawScalarTrait>::ValidationErrors>

The error type that can be returned by the try_sqrt method.
Source§

fn try_sqrt(self) -> Result<Self, Self::Error>

Attempts to compute the principal square root of self, returning a Result. Read more
Source§

fn sqrt(self) -> Self

Computes the square principal square root of self.
Source§

impl<'a, K: NumKernel> Sub<&'a RealValidated<K>> for ComplexValidated<K>

Source§

type Output = ComplexValidated<K>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &'a RealValidated<K>) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, K: NumKernel> Sub<&'a RealValidated<K>> for RealValidated<K>

Source§

type Output = RealValidated<K>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &'a Self) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, K: NumKernel> Sub<RealValidated<K>> for &'a RealValidated<K>

Source§

type Output = RealValidated<K>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: RealValidated<K>) -> Self::Output

Performs the - operation. Read more
Source§

impl<K: NumKernel> Sub<RealValidated<K>> for ComplexValidated<K>

Source§

type Output = ComplexValidated<K>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: RealValidated<K>) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, K: NumKernel> Sub for &'a RealValidated<K>

Source§

type Output = RealValidated<K>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &'a RealValidated<K>) -> Self::Output

Performs the - operation. Read more
Source§

impl<K: NumKernel> Sub for RealValidated<K>

Source§

type Output = RealValidated<K>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, K: NumKernel> SubAssign<&'a RealValidated<K>> for ComplexValidated<K>

Source§

fn sub_assign(&mut self, rhs: &'a RealValidated<K>)

Performs the -= operation. Read more
Source§

impl<'a, K: NumKernel> SubAssign<&'a RealValidated<K>> for RealValidated<K>

Source§

fn sub_assign(&mut self, rhs: &'a Self)

Performs the -= operation. Read more
Source§

impl<K: NumKernel> SubAssign<RealValidated<K>> for ComplexValidated<K>

Source§

fn sub_assign(&mut self, rhs: RealValidated<K>)

Performs the -= operation. Read more
Source§

impl<K: NumKernel> SubAssign for RealValidated<K>

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

impl<K: NumKernel> Sum for RealValidated<K>

Source§

fn sum<I>(iter: I) -> Self
where I: Iterator<Item = Self>,

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl<K: NumKernel> Tan for RealValidated<K>

Source§

type Error = FunctionErrors<TanRealInputErrors<<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value>, <<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value as RawScalarTrait>::ValidationErrors>

The error type that is returned by the try_tan method.
Source§

fn try_tan(self) -> Result<Self, Self::Error>

Computes the tangent of self and returns a Result. Read more
Source§

fn tan(self) -> Self

Computes and returns the tangent of self. Read more
Source§

impl<K: NumKernel> TanH for RealValidated<K>

Source§

type Error = FunctionErrors<TanHRealInputErrors<<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value>, <<<RealValidated<K> as TryNewValidated>::Policy as ValidationPolicy>::Value as RawScalarTrait>::ValidationErrors>

The error type that is returned by the try_tanh method.
Source§

fn try_tanh(self) -> Result<Self, Self::Error>

Computes the hyperbolic tangent of self and returns a Result. Read more
Source§

fn tanh(self) -> Self

Computes and returns the hyperbolic tangent of self. Read more
Source§

impl<K: NumKernel> TotalCmp for RealValidated<K>

Source§

fn total_cmp(&self, other: &Self) -> Ordering

Source§

impl<K: NumKernel> TryNew for RealValidated<K>

Source§

type Error = <<K as NumKernel>::RealPolicy as ValidationPolicy>::Error

The error type that can be returned by the try_new method.
Source§

fn try_new(value: Self::InnerType) -> Result<Self, Self::Error>

Attempts to create a new instance of Self from value. Read more
Source§

impl<K: NumKernel> TryNewValidated for RealValidated<K>

Source§

type Policy = <K as NumKernel>::RealPolicy

An implementor of ValidationPolicy. Read more
Source§

fn try_new_validated(value: Self::InnerType) -> Result<Self, Self::Error>

Attempts to create a new instance of Self from value. This method should first validate value using Self::Policy::validate_ref(&value) (or Self::Policy::validate(value) if consuming the value is intended by the policy). If validation is successful, it proceeds to construct the Self instance, typically by calling Self::try_new(value). If validation fails, the error from the policy is converted into Self::Error and returned. If construction after successful validation fails, the error from Self::try_new is returned.
Source§

impl<K: NumKernel> Zero for RealValidated<K>

Source§

fn zero() -> Self

Returns the additive identity element of Self, 0. Read more
Source§

fn is_zero(&self) -> bool

Returns true if self is equal to the additive identity.
Source§

fn set_zero(&mut self)

Sets self to the additive identity element of Self, 0.
Source§

impl<K: NumKernel> Arithmetic for RealValidated<K>

Source§

impl<K: NumKernel> HyperbolicFunctions for RealValidated<K>

Source§

impl<K: NumKernel> LogarithmFunctions for RealValidated<K>

Source§

impl<K: NumKernel> TrigonometricFunctions for RealValidated<K>

Auto Trait Implementations§

§

impl<K> Freeze for RealValidated<K>
where <K as RawKernel>::RawReal: Freeze,

§

impl<K> RefUnwindSafe for RealValidated<K>

§

impl<K> Send for RealValidated<K>

§

impl<K> Sync for RealValidated<K>

§

impl<K> Unpin for RealValidated<K>
where <K as RawKernel>::RawReal: Unpin, K: Unpin,

§

impl<K> UnwindSafe for RealValidated<K>

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> Az for T

Source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
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<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

Source§

fn cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> CheckedAs for T

Source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

Source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
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> ConditionallyCreate for T
where T: TryNew + New, <T as TryNew>::Error: Debug,

Source§

fn create_conditionally(value: Self::InnerType) -> Self

Conditionally creates an instance of Self. 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> OverflowingAs for T

Source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

Source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
Source§

impl<T> SaturatingAs for T

Source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

Source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<T> UnwrappedAs for T

Source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

Source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WrappingAs for T

Source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

Source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.