Struct twofloat::TwoFloat

source ·
pub struct TwoFloat { /* private fields */ }
Expand description

Represents a two-word floating point type, represented as the sum of two non-overlapping f64 values.

Implementations§

source§

impl TwoFloat

source

pub fn new_add(a: f64, b: f64) -> Self

Creates a new TwoFloat by adding two f64 values using Algorithm 2 from Joldes et al. (2017).

source

pub fn new_sub(a: f64, b: f64) -> Self

Creates a new TwoFloat by subtracting two f64 values using Algorithm 2 from Joldes et al. (2017) modified for negative right-hand side.

source

pub fn new_mul(a: f64, b: f64) -> Self

Creates a new TwoFloat by multiplying two f64 values using Algorithm 3 from Joldes et al. (2017).

source

pub fn new_div(a: f64, b: f64) -> Self

Creates a new TwoFloat by dividing two f64 values using Algorithm 15 from Joldes et al. (2017) modified for the left-hand-side having a zero value in the low word.

source§

impl TwoFloat

source

pub fn div_euclid(self, rhs: Self) -> Self

Calculates Euclidean division, the matching method for rem_euclid.

Examples
let a = TwoFloat::from(9.0);
let b = TwoFloat::from(5.0);

assert_eq!(a.div_euclid(b), TwoFloat::from(1.0));
assert_eq!((-a).div_euclid(b), TwoFloat::from(-2.0));
assert_eq!(a.div_euclid(-b), TwoFloat::from(-1.0));
assert_eq!((-a).div_euclid(-b), TwoFloat::from(2.0));
source

pub fn rem_euclid(self, rhs: Self) -> Self

Calculates the least nonnegative remainder of self (mod rhs).

The return value r usually satisfies 0.0 <= r < rhs.abs(), although the errors in numerical computation may result in violations of this constraint.

Examples
let a = TwoFloat::from(9.0);
let b = TwoFloat::from(5.0);

assert_eq!(a.rem_euclid(b), TwoFloat::from(4.0));
assert_eq!((-a).rem_euclid(b), TwoFloat::from(1.0));
assert_eq!(a.rem_euclid(-b), TwoFloat::from(4.0));
assert_eq!((-a).rem_euclid(-b), TwoFloat::from(1.0));
source§

impl TwoFloat

source

pub const MIN: Self = _

Smallest finite TwoFloat value.

source

pub const MIN_POSITIVE: Self = _

Smallest positive normal TwoFloat value.

source

pub const MAX: Self = _

Largest finite TwoFloat value.

source

pub const NAN: Self = _

Represents an error value equivalent to f64::NAN.

source

pub const EPSILON: Self = _

Represents the difference between 1.0 and the next representable normal value.

source

pub const INFINITY: Self = _

A positive infinite value

source

pub const NEG_INFINITY: Self = _

A negative infinite value

source

pub const fn from_f64(value: f64) -> Self

Creates a new TwoFloat from a constant f64 value.

Examples
const value: TwoFloat = TwoFloat::from_f64(1.0);
assert_eq!(value.hi(), 1.0);
source

pub fn hi(&self) -> f64

Returns the high word of self.

Examples
let value = TwoFloat::new_add(1.0, -1.0e-200);
assert_eq!(value.hi(), 1.0);
source

pub fn lo(&self) -> f64

Returns the low word of self.

Examples
let value = TwoFloat::new_add(1.0, -1.0e-200);
assert_eq!(value.lo(), -1.0e-200);
source

pub fn is_valid(&self) -> bool

Returns true if self is a valid value, where both components are finite (not infinity or NAN).

Examples
let a = TwoFloat::new_add(1.0, 1.0e-300).is_valid();
let b = TwoFloat::new_mul(1.0e300, 1.0e300).is_valid();

assert!(a);
assert!(!b);
source

pub fn min(self, other: Self) -> Self

Returns the minimum of two numbers. If one of the arguments is NAN, the other is returned.

Examples
let a = TwoFloat::new_add(35.2, 1e-84);
let b = TwoFloat::new_add(35.2, -1e-93);

assert_eq!(a.min(b), b);
source

pub fn max(self, other: Self) -> Self

Returns the maximum of two numbers. If one of the arguments is NAN, the other is returned.

Examples
let a = TwoFloat::new_add(35.2, 1e-84);
let b = TwoFloat::new_add(35.2, -1e-93);

assert_eq!(a.max(b), a);
source

pub fn to_radians(self) -> Self

Converts degrees to radians.

Examples
let a = TwoFloat::from(90.0);
let b = a.to_radians();

assert!((b - twofloat::consts::FRAC_PI_2).abs() < 1e-16);
source

pub fn to_degrees(self) -> Self

Converts radians to degrees.

Examples
let a = twofloat::consts::PI;
let b = a.to_degrees();

assert!((b - 180.0).abs() < 1e-16);
source

pub fn recip(self) -> Self

Takes the reciprocal (inverse) of the number, 1/x.

Examples
let a = TwoFloat::new_add(67.2, 5.7e-53);
let b = a.recip();
let difference = b.recip() - a;

assert!(difference.abs() < 1e-16);
source

pub fn powi(self, n: i32) -> Self

Raises the number to an integer power. Returns a NAN value for 0^0.

Examples
let a = TwoFloat::from(2.0).powi(3);
let b = TwoFloat::from(0.0).powi(0);

assert!(a - TwoFloat::from(8.0) <= 1e-16);
assert!(!b.is_valid());
source§

impl TwoFloat

source

pub fn fract(self) -> Self

Returns the fractional part of the number.

Examples
let a = TwoFloat::new_add(1.0, 1e-200).fract();
let b = TwoFloat::new_add(-1.0, 1e-200).fract();

assert_eq!(a, TwoFloat::from(1e-200));
assert_eq!(b, TwoFloat::new_add(-1.0, 1e-200));
source

pub fn trunc(self) -> Self

Returns the integer part of the number.

Examples
let a = TwoFloat::new_add(1.0, 1e-200).trunc();
let b = TwoFloat::new_add(1.0, -1e-200).trunc();

assert_eq!(a, TwoFloat::from(1.0));
assert_eq!(b, TwoFloat::from(0.0));
source

pub fn ceil(self) -> Self

Returns the smallest integer greater than or equal to the number.

Examples
let a = TwoFloat::new_add(1.0, 1e-200).ceil();
let b = TwoFloat::new_add(1.0, -1e-200).ceil();
let c = TwoFloat::new_add(-1.0, 1e-200).ceil();

assert_eq!(a, TwoFloat::from(2.0));
assert_eq!(b, TwoFloat::from(1.0));
assert_eq!(c, TwoFloat::from(0.0));
source

pub fn floor(self) -> Self

Returns the smallest integer less than or equal to the number.

Examples
let a = TwoFloat::new_add(1.0, 1e-200).floor();
let b = TwoFloat::new_add(1.0, -1e-200).floor();
let c = TwoFloat::new_add(-1.0, 1e-200).floor();

assert_eq!(a, TwoFloat::from(1.0));
assert_eq!(b, TwoFloat::from(0.0));
assert_eq!(c, TwoFloat::from(-1.0));
source

pub fn round(self) -> Self

Returns the nearest integer to the value. Round half-way cases away from 0.0.

Examples
let a = TwoFloat::new_add(1.0, 1e-200).round();
let b = TwoFloat::new_add(1.0, -1e-200).round();
let c = TwoFloat::from(-0.5).round();

assert_eq!(a, TwoFloat::from(1.0));
assert_eq!(b, TwoFloat::from(1.0));
assert_eq!(c, TwoFloat::from(-1.0));
source§

impl TwoFloat

source

pub fn abs(&self) -> Self

Returns the absolute value root of self.

Examples
let a = TwoFloat::new_add(1.0, 1.0e-300).abs();
let b = TwoFloat::new_add(-1.0, 1.0e-300).abs();

assert_eq!(a, TwoFloat::new_add(1.0, 1.0e-300));
assert_eq!(b, TwoFloat::new_add(1.0, -1.0e-300));
source

pub fn is_sign_positive(&self) -> bool

Returns true if self has a positive sign, including +0.0.

Examples
let a = TwoFloat::new_add(0.0, 0.0).is_sign_positive();
let b = TwoFloat::new_add(1.0, 1.0e-300).is_sign_positive();
let c = TwoFloat::new_add(-1.0, 1.0e-300).is_sign_positive();

assert!(a);
assert!(b);
assert!(!c);
source

pub fn is_sign_negative(&self) -> bool

Returns true if self has a negative sign, including -0.0.

Examples
let a = TwoFloat::new_add(-1.0, 1.0e-300).is_sign_negative();
let b = TwoFloat::new_add(0.0, 0.0).is_sign_negative();
let c = TwoFloat::new_add(1.0, 1.0e-300).is_sign_negative();

assert!(a);
assert!(!b);
assert!(!c);
source

pub fn copysign(&self, sign: &Self) -> Self

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

Equal to self if the sign of self and sign are the same, otherwise equal to -self.

Examples
let a = TwoFloat::new_add(-1.0, 1.0e-200);
let b = TwoFloat::new_add(1.0, 0.3);
let c = a.copysign(&b);

assert_eq!(c, -a);
source

pub fn signum(&self) -> Self

Returns a number that represents the sign of the value.

  • 1.0 if the number is positive or +0.0
  • -1.0 if the number is negative or -0.0
  • Invalid value otherwise
Examples
use twofloat::TwoFloat;

let a = TwoFloat::from(3.5); let b = TwoFloat::from(-0.0);

assert_eq!(a.signum(), 1.0); assert_eq!(b.signum(), -1.0);

source§

impl TwoFloat

source

pub fn exp(self) -> Self

Returns e^(self), (the exponential function).

Examples
let a = TwoFloat::from(2.0);
let b = a.exp();
let e2 = twofloat::consts::E * twofloat::consts::E;

assert!((b - e2).abs() / e2 < 1e-16);
source

pub fn exp_m1(self) -> Self

Returns e^(self) - 1 in a way that provides additional accuracy when the value is close to zero.

Examples
let a = TwoFloat::from(0.05);
let b = a.exp_m1();
let c = 0.05f64.exp_m1();

assert!((b - c).abs() < 1e-16);
source

pub fn exp2(self) -> Self

Returns 2^(self).

Examples
let a = TwoFloat::from(0.5).exp2();
let b = TwoFloat::from(2).sqrt();

assert!((a - b).abs() < 1e-15);
source

pub fn ln(self) -> Self

Returns the natural logarithm of the value.

Uses Newton–Raphson iteration which depends on the exp function, so may not be fully accurate to the full precision of a TwoFloat.

Example
let a = twofloat::consts::E.ln();
assert!((a - 1.0).abs() < 1e-11);
source

pub fn ln_1p(self) -> Self

Returns the natural logarithm of 1 + self.

Uses Newton–Raphson iteration which depends on the expm1 function, so may not be fully accurate to the full precision of a TwoFloat.

Example
let a = TwoFloat::from(0.1);
let b = a.ln_1p();
let c = 0.1f64.ln_1p();
assert!((b - c).abs() < 1e-10);
source

pub fn log(self, base: Self) -> Self

Returns the logarithm of the number with respect to an arbitrary base.

This is a convenience method that computes self.ln() / base.ln(), no additional accuracy is provided.

Examples

let a = TwoFloat::from(81.0); let b = TwoFloat::from(3.0); let c = TwoFloat::log(a, b);

assert!((c - 4.0).abs() < 1e-12);

source

pub fn log2(self) -> Self

Returns the base 2 logarithm of the number.

Uses Newton–Raphson iteration which depends on the exp2 function, so may not be fully accurate to the full precision of a TwoFloat.

Examples
let a = TwoFloat::from(64.0).log2();

assert!((a - 6.0).abs() < 1e-12, "{}", a);
source

pub fn log10(self) -> Self

Returns the base 10 logarithm of the number.

This is a convenience method that computes self.ln() / LN_10, no additional accuracy is provided.

Examples
let a = TwoFloat::from(100.0).log10();

assert!((a - 2.0).abs() < 1e-12);
source§

impl TwoFloat

source

pub fn cosh(self) -> Self

Hyperbolic cosine function.

This is a convenience method that computes the value by calling the exponential function.

Examples
let a = TwoFloat::from(2.0);
let b = a.cosh();
let c = 2.0f64.cosh();

assert!((b - c).abs() < 1e-10);
source

pub fn sinh(self) -> Self

Hyperbolic sine function.

This is a convenience method that computes the value by calling the exponential function.

Examples
let a = TwoFloat::from(2.0);
let b = a.sinh();
let c = 2.0f64.sinh();

assert!((b - c).abs() < 1e-10);
source

pub fn tanh(self) -> Self

Hyperbolic tangent function.

This is a convenience method that computes the value by calling the exponential function.

Examples
let a = TwoFloat::from(2.0);
let b = a.tanh();
let c = 2.0f64.tanh();

assert!((b - c).abs() < 1e-10);
source

pub fn acosh(self) -> Self

Inverse hyperbolic cosine function.

This is a convenience method that computes the value by calling the sqrt and ln functions.

Examples
let a = TwoFloat::from(2.0);
let b = a.acosh();
let c = 2.0f64.acosh();

assert!((b - c).abs() < 1e-10);
source

pub fn asinh(self) -> Self

Inverse hyperbolic sine function.

This is a convenience method that computes the value by calling the sqrt and ln functions.

Examples
let a = TwoFloat::from(2.0);
let b = a.asinh();
let c = 2.0f64.asinh();

assert!((b - c).abs() < 1e-10);
source

pub fn atanh(self) -> Self

Inverse hyperbolic tangent function.

This is a convenience method that computes the value by calling the ln function.

Examples
let a = TwoFloat::from(0.5);
let b = a.atanh();
let c = 0.5f64.atanh();

assert!((b - c).abs() < 1e-10);
source§

impl TwoFloat

source

pub fn sqrt(self) -> Self

Returns the square root of the number, using equation 4 from Karp & Markstein (1997).

Examples
let a = TwoFloat::from(2.0);
let b = a.sqrt();

assert!(b * b - a < 1e-16);
source

pub fn cbrt(self) -> Self

Returns the cube root of the number, using Newton-Raphson iteration.

Examples
let a = TwoFloat::new_add(1.4e53, 0.21515);
let b = a.cbrt();

assert!(b.powi(3) - a < 1e-16);
source

pub fn hypot(self, other: Self) -> Self

Calculates the length of the hypotenuse of a right-angle triangle given legs of length self and other.

Examples
let a = TwoFloat::from(3.0);
let b = TwoFloat::from(4.0);
let c = TwoFloat::hypot(a, b);

assert!((c - 5.0).abs() < 1e-10);
source

pub fn powf(self, y: Self) -> Self

Returns the value raised to the power y.

This method is quite inaccurate, where possible powi, sqrt or cbrt should be preferred.

Examples
let a = TwoFloat::from(-5.0);
let b = TwoFloat::from(3.0);
let c = a.powf(b);

assert!((c + 125.0).abs() < 1e-9, "{}", c);
source§

impl TwoFloat

source

pub fn sin(self) -> Self

Computes the sine of the value (in radians).

Examples
let a = TwoFloat::from(2.5);
let b = a.sin();
let c = 2.5f64.sin();

assert!((b - c).abs() < 1e-10);
source

pub fn cos(self) -> Self

Computes the cosine of the value (in radians)

Examples
let a = TwoFloat::from(2.5);
let b = a.cos();
let c = 2.5f64.cos();

assert!((b - c).abs() < 1e-10);
source

pub fn sin_cos(self) -> (Self, Self)

Simultaneously computes the sine and cosine of the value. Returns a tuple with the sine as the first element and the cosine as the second element.

Examples
let a = TwoFloat::from(2.5);
let (s, c) = a.sin_cos();

assert!((s - 2.5f64.sin()).abs() < 1e-10);
assert!((c - 2.5f64.cos()).abs() < 1e-10);
source

pub fn tan(self) -> Self

Computes the tangent of the value (in radians).

Examples
let a = TwoFloat::from(2.5);
let b = a.tan();
let c = 2.5f64.tan();

assert!((b - c).abs() < 1e-10);
source

pub fn asin(self) -> Self

Computes the arcsine of the value. Return value is in radians in the range [-π/2, π/2] or an invalid value if the input value is outside the range [-1, 1].

Examples
let a = TwoFloat::from(0.7);
let b = a.asin();
let c = 0.7f64.asin();

assert!((b - c).abs() < 1e-10);
source

pub fn acos(self) -> Self

Computes the arccosine of the value. Return value is in radians in the range [0, π] or an invalid value if the input value is outside the range [-1, 1].

Examples
let a = TwoFloat::from(-0.8);
let b = a.acos();
let c = (-0.8f64).acos();

assert!((b - c).abs() < 1e-10);
source

pub fn atan(self) -> Self

Computes the arctangent of the value. Return value is in radians in the range [-π/2, π/2].

Examples
let a = TwoFloat::from(3.5);
let b = a.atan();
let c = 3.5f64.atan();

assert!((b - c).abs() < 1e-10);
source

pub fn atan2(self, other: Self) -> Self

Computes the four quadrant arctangent of self (y) and other (x) in radians.

Examples
let y = TwoFloat::from(-1.0);
let x = TwoFloat::from(-1.0);
let theta = TwoFloat::atan2(y, x);

assert!((theta + 3.0 * twofloat::consts::FRAC_PI_4).abs() < 1e-10);

Trait Implementations§

source§

impl<'a, 'b> Add<&'b TwoFloat> for &'a TwoFloat

source§

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

Implements addition of two TwoFloat values using Joldes et al. (2017) Algorithm 6.

§

type Output = TwoFloat

The resulting type after applying the + operator.
source§

impl<'a, 'b> Add<&'b TwoFloat> for &'a f64

source§

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

Implements addition of TwoFloat and f64 using Joldes et al. (2017) Algorithm 4.

§

type Output = TwoFloat

The resulting type after applying the + operator.
source§

impl<'b> Add<&'b TwoFloat> for TwoFloat

source§

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

Implements addition of two TwoFloat values using Joldes et al. (2017) Algorithm 6.

§

type Output = TwoFloat

The resulting type after applying the + operator.
source§

impl<'b> Add<&'b TwoFloat> for f64

source§

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

Implements addition of TwoFloat and f64 using Joldes et al. (2017) Algorithm 4.

§

type Output = TwoFloat

The resulting type after applying the + operator.
source§

impl<'a, 'b> Add<&'b f64> for &'a TwoFloat

source§

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

Implements addition of TwoFloat and f64 using Joldes et al. (2017) Algorithm 4.

§

type Output = TwoFloat

The resulting type after applying the + operator.
source§

impl<'b> Add<&'b f64> for TwoFloat

source§

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

Implements addition of TwoFloat and f64 using Joldes et al. (2017) Algorithm 4.

§

type Output = TwoFloat

The resulting type after applying the + operator.
source§

impl<'a> Add<TwoFloat> for &'a TwoFloat

source§

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

Implements addition of two TwoFloat values using Joldes et al. (2017) Algorithm 6.

§

type Output = TwoFloat

The resulting type after applying the + operator.
source§

impl<'a> Add<TwoFloat> for &'a f64

source§

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

Implements addition of TwoFloat and f64 using Joldes et al. (2017) Algorithm 4.

§

type Output = TwoFloat

The resulting type after applying the + operator.
source§

impl Add<TwoFloat> for TwoFloat

source§

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

Implements addition of two TwoFloat values using Joldes et al. (2017) Algorithm 6.

§

type Output = TwoFloat

The resulting type after applying the + operator.
source§

impl Add<TwoFloat> for f64

source§

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

Implements addition of TwoFloat and f64 using Joldes et al. (2017) Algorithm 4.

§

type Output = TwoFloat

The resulting type after applying the + operator.
source§

impl<'a> Add<f64> for &'a TwoFloat

source§

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

Implements addition of TwoFloat and f64 using Joldes et al. (2017) Algorithm 4.

§

type Output = TwoFloat

The resulting type after applying the + operator.
source§

impl Add<f64> for TwoFloat

source§

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

Implements addition of TwoFloat and f64 using Joldes et al. (2017) Algorithm 4.

§

type Output = TwoFloat

The resulting type after applying the + operator.
source§

impl<'a> AddAssign<&'a TwoFloat> for TwoFloat

source§

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

Implements addition of two TwoFloat values using Joldes et al. (2017) Algorithm 6.

source§

impl<'a> AddAssign<&'a f64> for TwoFloat

source§

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

Implements addition of TwoFloat and f64 using Joldes et al. (2017) Algorithm 4.

source§

impl<'a> AddAssign<TwoFloat> for TwoFloat

source§

fn add_assign(&mut self, rhs: TwoFloat)

Implements addition of two TwoFloat values using Joldes et al. (2017) Algorithm 6.

source§

impl<'a> AddAssign<f64> for TwoFloat

source§

fn add_assign(&mut self, rhs: f64)

Implements addition of TwoFloat and f64 using Joldes et al. (2017) Algorithm 4.

source§

impl Bounded for TwoFloat

source§

fn min_value() -> TwoFloat

Returns the smallest finite number this type can represent
source§

fn max_value() -> TwoFloat

Returns the largest finite number this type can represent
source§

impl Clone for TwoFloat

source§

fn clone(&self) -> TwoFloat

Returns a copy 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 Debug for TwoFloat

source§

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

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

impl Default for TwoFloat

source§

fn default() -> TwoFloat

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for TwoFloat

source§

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 Display for TwoFloat

source§

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

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

impl<'a, 'b> Div<&'b TwoFloat> for &'a TwoFloat

source§

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

Implements division of two TwoFloat values using Joldes et al. (2017) Algorithm 18.

§

type Output = TwoFloat

The resulting type after applying the / operator.
source§

impl<'a, 'b> Div<&'b TwoFloat> for &'a f64

source§

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

Implements division of f64 and TwoFloat using Joldes et al. (2017) Algorithm 18 modified for the left-hand side having a zero value in the low word.

§

type Output = TwoFloat

The resulting type after applying the / operator.
source§

impl<'b> Div<&'b TwoFloat> for TwoFloat

source§

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

Implements division of two TwoFloat values using Joldes et al. (2017) Algorithm 18.

§

type Output = TwoFloat

The resulting type after applying the / operator.
source§

impl<'b> Div<&'b TwoFloat> for f64

source§

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

Implements division of f64 and TwoFloat using Joldes et al. (2017) Algorithm 18 modified for the left-hand side having a zero value in the low word.

§

type Output = TwoFloat

The resulting type after applying the / operator.
source§

impl<'a, 'b> Div<&'b f64> for &'a TwoFloat

source§

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

Implements division of TwoFloat and f64 using Joldes et al. (2017) Algorithm 15

§

type Output = TwoFloat

The resulting type after applying the / operator.
source§

impl<'b> Div<&'b f64> for TwoFloat

source§

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

Implements division of TwoFloat and f64 using Joldes et al. (2017) Algorithm 15

§

type Output = TwoFloat

The resulting type after applying the / operator.
source§

impl<'a> Div<TwoFloat> for &'a TwoFloat

source§

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

Implements division of two TwoFloat values using Joldes et al. (2017) Algorithm 18.

§

type Output = TwoFloat

The resulting type after applying the / operator.
source§

impl<'a> Div<TwoFloat> for &'a f64

source§

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

Implements division of f64 and TwoFloat using Joldes et al. (2017) Algorithm 18 modified for the left-hand side having a zero value in the low word.

§

type Output = TwoFloat

The resulting type after applying the / operator.
source§

impl Div<TwoFloat> for TwoFloat

source§

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

Implements division of two TwoFloat values using Joldes et al. (2017) Algorithm 18.

§

type Output = TwoFloat

The resulting type after applying the / operator.
source§

impl Div<TwoFloat> for f64

source§

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

Implements division of f64 and TwoFloat using Joldes et al. (2017) Algorithm 18 modified for the left-hand side having a zero value in the low word.

§

type Output = TwoFloat

The resulting type after applying the / operator.
source§

impl<'a> Div<f64> for &'a TwoFloat

source§

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

Implements division of TwoFloat and f64 using Joldes et al. (2017) Algorithm 15

§

type Output = TwoFloat

The resulting type after applying the / operator.
source§

impl Div<f64> for TwoFloat

source§

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

Implements division of TwoFloat and f64 using Joldes et al. (2017) Algorithm 15

§

type Output = TwoFloat

The resulting type after applying the / operator.
source§

impl<'a> DivAssign<&'a TwoFloat> for TwoFloat

source§

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

Implements division of two TwoFloat values using Joldes et al. (2017) Algorithm 18.

source§

impl<'a> DivAssign<&'a f64> for TwoFloat

source§

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

Implements division of TwoFloat and f64 using Joldes et al. (2017) Algorithm 15

source§

impl<'a> DivAssign<TwoFloat> for TwoFloat

source§

fn div_assign(&mut self, rhs: TwoFloat)

Implements division of two TwoFloat values using Joldes et al. (2017) Algorithm 18.

source§

impl<'a> DivAssign<f64> for TwoFloat

source§

fn div_assign(&mut self, rhs: f64)

Implements division of TwoFloat and f64 using Joldes et al. (2017) Algorithm 15

source§

impl Float for TwoFloat

source§

fn infinity() -> Self

Returns the infinite value. Read more
source§

fn neg_infinity() -> Self

Returns the negative infinite value. Read more
source§

fn nan() -> Self

Returns the NaN value. Read more
source§

fn neg_zero() -> Self

Returns -0.0. Read more
source§

fn min_value() -> Self

Returns the smallest finite value that this type can represent. Read more
source§

fn min_positive_value() -> Self

Returns the smallest positive, normalized value that this type can represent. Read more
source§

fn epsilon() -> Self

Returns epsilon, a small positive value. Read more
source§

fn max_value() -> Self

Returns the largest finite value that this type can represent. Read more
source§

fn 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. Read more
source§

fn to_degrees(self) -> Self

Converts radians to degrees. Read more
source§

fn to_radians(self) -> Self

Converts degrees to radians. Read more
source§

fn integer_decode(self) -> (u64, i16, i8)

Returns the mantissa, base 2 exponent, and sign as integers, respectively. The original number can be recovered by sign * mantissa * 2 ^ exponent. Read more
source§

fn is_nan(self) -> bool

Returns true if this value is NaN and false otherwise. Read more
source§

fn is_infinite(self) -> bool

Returns true if this value is positive infinity or negative infinity and false otherwise. Read more
source§

fn is_finite(self) -> bool

Returns true if this number is neither infinite nor NaN. Read more
source§

fn is_normal(self) -> bool

Returns true if the number is neither zero, infinite, subnormal, or NaN. Read more
source§

fn floor(self) -> Self

Returns the largest integer less than or equal to a number. Read more
source§

fn ceil(self) -> Self

Returns the smallest integer greater than or equal to a number. Read more
source§

fn round(self) -> Self

Returns the nearest integer to a number. Round half-way cases away from 0.0. Read more
source§

fn trunc(self) -> Self

Return the integer part of a number. Read more
source§

fn fract(self) -> Self

Returns the fractional part of a number. Read more
source§

fn abs(self) -> Self

Computes the absolute value of self. Returns Float::nan() if the number is Float::nan(). Read more
source§

fn signum(self) -> Self

Returns a number that represents the sign of self. Read more
source§

fn is_sign_positive(self) -> bool

Returns true if self is positive, including +0.0, Float::infinity(), and since Rust 1.20 also Float::nan(). Read more
source§

fn is_sign_negative(self) -> bool

Returns true if self is negative, including -0.0, Float::neg_infinity(), and since Rust 1.20 also -Float::nan(). Read more
source§

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

Returns the minimum of the two numbers. Read more
source§

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

Returns the maximum of the two numbers. Read more
source§

fn recip(self) -> Self

Take the reciprocal (inverse) of a number, 1/x. Read more
source§

fn powi(self, exp: i32) -> Self

Raise a number to an integer power. Read more
source§

fn mul_add(self, a: Self, b: Self) -> Self

Fused multiply-add. Computes (self * a) + b with only one rounding error, yielding a more accurate result than an unfused multiply-add. Read more
source§

fn powf(self, n: Self) -> Self

Raise a number to a floating point power. Read more
source§

fn sqrt(self) -> Self

Take the square root of a number. Read more
source§

fn exp(self) -> Self

Returns e^(self), (the exponential function). Read more
source§

fn exp2(self) -> Self

Returns 2^(self). Read more
source§

fn ln(self) -> Self

Returns the natural logarithm of the number. Read more
source§

fn log(self, base: Self) -> Self

Returns the logarithm of the number with respect to an arbitrary base. Read more
source§

fn log2(self) -> Self

Returns the base 2 logarithm of the number. Read more
source§

fn log10(self) -> Self

Returns the base 10 logarithm of the number. Read more
source§

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

The positive difference of two numbers. Read more
source§

fn cbrt(self) -> Self

Take the cubic root of a number. Read more
source§

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

Calculate the length of the hypotenuse of a right-angle triangle given legs of length x and y. Read more
source§

fn sin(self) -> Self

Computes the sine of a number (in radians). Read more
source§

fn cos(self) -> Self

Computes the cosine of a number (in radians). Read more
source§

fn tan(self) -> Self

Computes the tangent of a number (in radians). Read more
source§

fn asin(self) -> Self

Computes the arcsine of a number. Return value is in radians in the range [-pi/2, pi/2] or NaN if the number is outside the range [-1, 1]. Read more
source§

fn acos(self) -> Self

Computes the arccosine of a number. Return value is in radians in the range [0, pi] or NaN if the number is outside the range [-1, 1]. Read more
source§

fn atan(self) -> Self

Computes the arctangent of a number. Return value is in radians in the range [-pi/2, pi/2]; Read more
source§

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

Computes the four quadrant arctangent of self (y) and other (x). Read more
source§

fn sin_cos(self) -> (Self, Self)

Simultaneously computes the sine and cosine of the number, x. Returns (sin(x), cos(x)). Read more
source§

fn exp_m1(self) -> Self

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

fn ln_1p(self) -> Self

Returns ln(1+n) (natural logarithm) more accurately than if the operations were performed separately. Read more
source§

fn sinh(self) -> Self

Hyperbolic sine function. Read more
source§

fn cosh(self) -> Self

Hyperbolic cosine function. Read more
source§

fn tanh(self) -> Self

Hyperbolic tangent function. Read more
source§

fn asinh(self) -> Self

Inverse hyperbolic sine function. Read more
source§

fn acosh(self) -> Self

Inverse hyperbolic cosine function. Read more
source§

fn atanh(self) -> Self

Inverse hyperbolic tangent function. Read more
source§

fn copysign(self, sign: Self) -> Self

Returns a number composed of the magnitude of self and the sign of sign. Read more
source§

impl FloatConst for TwoFloat

source§

fn E() -> Self

Return Euler’s number.
source§

fn FRAC_1_PI() -> Self

Return 1.0 / π.
source§

fn FRAC_1_SQRT_2() -> Self

Return 1.0 / sqrt(2.0).
source§

fn FRAC_2_PI() -> Self

Return 2.0 / π.
source§

fn FRAC_2_SQRT_PI() -> Self

Return 2.0 / sqrt(π).
source§

fn FRAC_PI_2() -> Self

Return π / 2.0.
source§

fn FRAC_PI_3() -> Self

Return π / 3.0.
source§

fn FRAC_PI_4() -> Self

Return π / 4.0.
source§

fn FRAC_PI_6() -> Self

Return π / 6.0.
source§

fn FRAC_PI_8() -> Self

Return π / 8.0.
source§

fn LN_10() -> Self

Return ln(10.0).
source§

fn LN_2() -> Self

Return ln(2.0).
source§

fn LOG10_E() -> Self

Return log10(e).
source§

fn LOG2_E() -> Self

Return log2(e).
source§

fn PI() -> Self

Return Archimedes’ constant π.
source§

fn SQRT_2() -> Self

Return sqrt(2.0).
source§

fn TAU() -> Self

Return the full circle constant τ.
source§

fn LOG10_2() -> Self

Return log10(2.0).
source§

fn LOG2_10() -> Self

Return log2(10.0).
source§

impl FloatCore for TwoFloat

source§

fn infinity() -> Self

Returns positive infinity. Read more
source§

fn neg_infinity() -> Self

Returns negative infinity. Read more
source§

fn nan() -> Self

Returns NaN. Read more
source§

fn neg_zero() -> Self

Returns -0.0. Read more
source§

fn min_value() -> Self

Returns the smallest finite value that this type can represent. Read more
source§

fn min_positive_value() -> Self

Returns the smallest positive, normalized value that this type can represent. Read more
source§

fn epsilon() -> Self

Returns epsilon, a small positive value. Read more
source§

fn max_value() -> Self

Returns the largest finite value that this type can represent. Read more
source§

fn 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. Read more
source§

fn to_degrees(self) -> Self

Converts to degrees, assuming the number is in radians. Read more
source§

fn to_radians(self) -> Self

Converts to radians, assuming the number is in degrees. Read more
source§

fn integer_decode(self) -> (u64, i16, i8)

Returns the mantissa, base 2 exponent, and sign as integers, respectively. The original number can be recovered by sign * mantissa * 2 ^ exponent. Read more
source§

fn is_nan(self) -> bool

Returns true if the number is NaN. Read more
source§

fn is_infinite(self) -> bool

Returns true if the number is infinite. Read more
source§

fn is_finite(self) -> bool

Returns true if the number is neither infinite or NaN. Read more
source§

fn is_normal(self) -> bool

Returns true if the number is neither zero, infinite, subnormal or NaN. Read more
source§

fn floor(self) -> Self

Returns the largest integer less than or equal to a number. Read more
source§

fn ceil(self) -> Self

Returns the smallest integer greater than or equal to a number. Read more
source§

fn round(self) -> Self

Returns the nearest integer to a number. Round half-way cases away from 0.0. Read more
source§

fn trunc(self) -> Self

Return the integer part of a number. Read more
source§

fn fract(self) -> Self

Returns the fractional part of a number. Read more
source§

fn abs(self) -> Self

Computes the absolute value of self. Returns FloatCore::nan() if the number is FloatCore::nan(). Read more
source§

fn signum(self) -> Self

Returns a number that represents the sign of self. Read more
source§

fn is_sign_positive(self) -> bool

Returns true if self is positive, including +0.0 and FloatCore::infinity(), and since Rust 1.20 also FloatCore::nan(). Read more
source§

fn is_sign_negative(self) -> bool

Returns true if self is negative, including -0.0 and FloatCore::neg_infinity(), and since Rust 1.20 also -FloatCore::nan(). Read more
source§

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

Returns the minimum of the two numbers. Read more
source§

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

Returns the maximum of the two numbers. Read more
source§

fn recip(self) -> Self

Returns the reciprocal (multiplicative inverse) of the number. Read more
source§

fn powi(self, exp: i32) -> Self

Raise a number to an integer power. Read more
source§

impl<'a> From<&'a TwoFloat> for [f64; 2]

source§

fn from(value: &'a TwoFloat) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a TwoFloat> for (f64, f64)

source§

fn from(value: &'a TwoFloat) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a TwoFloat> for f32

source§

fn from(value: &'a TwoFloat) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a TwoFloat> for f64

source§

fn from(value: &'a TwoFloat) -> Self

Converts to this type from the input type.
source§

impl From<TwoFloat> for [f64; 2]

source§

fn from(value: TwoFloat) -> Self

Converts to this type from the input type.
source§

impl From<TwoFloat> for (f64, f64)

source§

fn from(value: TwoFloat) -> Self

Converts to this type from the input type.
source§

impl From<TwoFloat> for f32

source§

fn from(value: TwoFloat) -> Self

Converts to this type from the input type.
source§

impl From<TwoFloat> for f64

source§

fn from(value: TwoFloat) -> Self

Converts to this type from the input type.
source§

impl From<f32> for TwoFloat

source§

fn from(value: f32) -> Self

Converts to this type from the input type.
source§

impl From<f64> for TwoFloat

source§

fn from(value: f64) -> Self

Converts to this type from the input type.
source§

impl From<i128> for TwoFloat

source§

fn from(value: i128) -> Self

Converts to this type from the input type.
source§

impl From<i16> for TwoFloat

source§

fn from(value: i16) -> Self

Converts to this type from the input type.
source§

impl From<i32> for TwoFloat

source§

fn from(value: i32) -> Self

Converts to this type from the input type.
source§

impl From<i64> for TwoFloat

source§

fn from(value: i64) -> Self

Converts to this type from the input type.
source§

impl From<i8> for TwoFloat

source§

fn from(value: i8) -> Self

Converts to this type from the input type.
source§

impl From<u128> for TwoFloat

source§

fn from(value: u128) -> Self

Converts to this type from the input type.
source§

impl From<u16> for TwoFloat

source§

fn from(value: u16) -> Self

Converts to this type from the input type.
source§

impl From<u32> for TwoFloat

source§

fn from(value: u32) -> Self

Converts to this type from the input type.
source§

impl From<u64> for TwoFloat

source§

fn from(value: u64) -> Self

Converts to this type from the input type.
source§

impl From<u8> for TwoFloat

source§

fn from(value: u8) -> Self

Converts to this type from the input type.
source§

impl FromPrimitive for TwoFloat

source§

fn from_i8(n: i8) -> Option<Self>

Converts an i8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_i16(n: i16) -> Option<Self>

Converts an i16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_i32(n: i32) -> Option<Self>

Converts an i32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_i64(n: i64) -> Option<Self>

Converts an i64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_i128(n: i128) -> Option<Self>

Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
source§

fn from_isize(n: isize) -> Option<Self>

Converts an isize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_u8(n: u8) -> Option<Self>

Converts an u8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_u16(n: u16) -> Option<Self>

Converts an u16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_u32(n: u32) -> Option<Self>

Converts an u32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_u64(n: u64) -> Option<Self>

Converts an u64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_u128(n: u128) -> Option<Self>

Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
source§

fn from_usize(n: usize) -> Option<Self>

Converts a usize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_f32(n: f32) -> Option<Self>

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_f64(n: f64) -> Option<Self>

Converts a f64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
source§

impl<'a> Inv for &'a TwoFloat

§

type Output = TwoFloat

The result after applying the operator.
source§

fn inv(self) -> Self::Output

Returns the multiplicative inverse of self. Read more
source§

impl Inv for TwoFloat

§

type Output = TwoFloat

The result after applying the operator.
source§

fn inv(self) -> Self::Output

Returns the multiplicative inverse of self. Read more
source§

impl LowerExp for TwoFloat

source§

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

Formats the value using the given formatter.
source§

impl<'a, 'b> Mul<&'b TwoFloat> for &'a TwoFloat

source§

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

Implements multiplication of two TwoFloat values using Joldes et al. (2017) Algorithm 12.

§

type Output = TwoFloat

The resulting type after applying the * operator.
source§

impl<'a, 'b> Mul<&'b TwoFloat> for &'a f64

source§

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

Implements multiplication of TwoFloat and f64 using Joldes et al. (2017) Algorithm 9.

§

type Output = TwoFloat

The resulting type after applying the * operator.
source§

impl<'b> Mul<&'b TwoFloat> for TwoFloat

source§

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

Implements multiplication of two TwoFloat values using Joldes et al. (2017) Algorithm 12.

§

type Output = TwoFloat

The resulting type after applying the * operator.
source§

impl<'b> Mul<&'b TwoFloat> for f64

source§

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

Implements multiplication of TwoFloat and f64 using Joldes et al. (2017) Algorithm 9.

§

type Output = TwoFloat

The resulting type after applying the * operator.
source§

impl<'a, 'b> Mul<&'b f64> for &'a TwoFloat

source§

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

Implements multiplication of TwoFloat and f64 using Joldes et al. (2017) Algorithm 9.

§

type Output = TwoFloat

The resulting type after applying the * operator.
source§

impl<'b> Mul<&'b f64> for TwoFloat

source§

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

Implements multiplication of TwoFloat and f64 using Joldes et al. (2017) Algorithm 9.

§

type Output = TwoFloat

The resulting type after applying the * operator.
source§

impl<'a> Mul<TwoFloat> for &'a TwoFloat

source§

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

Implements multiplication of two TwoFloat values using Joldes et al. (2017) Algorithm 12.

§

type Output = TwoFloat

The resulting type after applying the * operator.
source§

impl<'a> Mul<TwoFloat> for &'a f64

source§

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

Implements multiplication of TwoFloat and f64 using Joldes et al. (2017) Algorithm 9.

§

type Output = TwoFloat

The resulting type after applying the * operator.
source§

impl Mul<TwoFloat> for TwoFloat

source§

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

Implements multiplication of two TwoFloat values using Joldes et al. (2017) Algorithm 12.

§

type Output = TwoFloat

The resulting type after applying the * operator.
source§

impl Mul<TwoFloat> for f64

source§

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

Implements multiplication of TwoFloat and f64 using Joldes et al. (2017) Algorithm 9.

§

type Output = TwoFloat

The resulting type after applying the * operator.
source§

impl<'a> Mul<f64> for &'a TwoFloat

source§

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

Implements multiplication of TwoFloat and f64 using Joldes et al. (2017) Algorithm 9.

§

type Output = TwoFloat

The resulting type after applying the * operator.
source§

impl Mul<f64> for TwoFloat

source§

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

Implements multiplication of TwoFloat and f64 using Joldes et al. (2017) Algorithm 9.

§

type Output = TwoFloat

The resulting type after applying the * operator.
source§

impl<'a> MulAssign<&'a TwoFloat> for TwoFloat

source§

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

Implements multiplication of two TwoFloat values using Joldes et al. (2017) Algorithm 12.

source§

impl<'a> MulAssign<&'a f64> for TwoFloat

source§

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

Implements multiplication of TwoFloat and f64 using Joldes et al. (2017) Algorithm 9.

source§

impl<'a> MulAssign<TwoFloat> for TwoFloat

source§

fn mul_assign(&mut self, rhs: TwoFloat)

Implements multiplication of two TwoFloat values using Joldes et al. (2017) Algorithm 12.

source§

impl<'a> MulAssign<f64> for TwoFloat

source§

fn mul_assign(&mut self, rhs: f64)

Implements multiplication of TwoFloat and f64 using Joldes et al. (2017) Algorithm 9.

source§

impl<'a> Neg for &'a TwoFloat

§

type Output = TwoFloat

The resulting type after applying the - operator.
source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
source§

impl Neg for TwoFloat

§

type Output = TwoFloat

The resulting type after applying the - operator.
source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
source§

impl Num for TwoFloat

§

type FromStrRadixErr = TwoFloatError

source§

fn from_str_radix( _str: &str, _radix: u32 ) -> Result<Self, Self::FromStrRadixErr>

Convert from a string and radix (typically 2..=36). Read more
source§

impl NumCast for TwoFloat

source§

fn from<T: ToPrimitive>(n: T) -> Option<Self>

Creates a number from another value that can be converted into a primitive via the ToPrimitive trait. If the source value cannot be represented by the target type, then None is returned. Read more
source§

impl One for TwoFloat

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) -> boolwhere Self: PartialEq<Self>,

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

impl PartialEq<TwoFloat> for TwoFloat

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<TwoFloat> for f64

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<f64> for TwoFloat

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<TwoFloat> for TwoFloat

source§

fn partial_cmp(&self, other: &TwoFloat) -> 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

This method 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

This method 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

This method 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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl PartialOrd<TwoFloat> for f64

source§

fn partial_cmp(&self, other: &TwoFloat) -> 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

This method 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

This method 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

This method 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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl PartialOrd<f64> for TwoFloat

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

This method 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

This method 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

This method 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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<'a, 'b> Pow<&'b TwoFloat> for &'a TwoFloat

§

type Output = TwoFloat

The result after applying the operator.
source§

fn pow(self, rhs: &'b TwoFloat) -> Self::Output

Returns self to the power rhs. Read more
source§

impl<'b> Pow<&'b TwoFloat> for TwoFloat

§

type Output = TwoFloat

The result after applying the operator.
source§

fn pow(self, rhs: &'b TwoFloat) -> Self::Output

Returns self to the power rhs. Read more
source§

impl<'a, 'b> Pow<&'b f64> for &'a TwoFloat

§

type Output = TwoFloat

The result after applying the operator.
source§

fn pow(self, rhs: &'b f64) -> Self::Output

Returns self to the power rhs. Read more
source§

impl<'b> Pow<&'b f64> for TwoFloat

§

type Output = TwoFloat

The result after applying the operator.
source§

fn pow(self, rhs: &'b f64) -> Self::Output

Returns self to the power rhs. Read more
source§

impl<'a, 'b> Pow<&'b i16> for &'a TwoFloat

§

type Output = TwoFloat

The result after applying the operator.
source§

fn pow(self, rhs: &'b i16) -> Self::Output

Returns self to the power rhs. Read more
source§

impl<'b> Pow<&'b i16> for TwoFloat

§

type Output = TwoFloat

The result after applying the operator.
source§

fn pow(self, rhs: &'b i16) -> Self::Output

Returns self to the power rhs. Read more
source§

impl<'a, 'b> Pow<&'b i32> for &'a TwoFloat

§

type Output = TwoFloat

The result after applying the operator.
source§

fn pow(self, rhs: &'b i32) -> Self::Output

Returns self to the power rhs. Read more
source§

impl<'b> Pow<&'b i32> for TwoFloat

§

type Output = TwoFloat

The result after applying the operator.
source§

fn pow(self, rhs: &'b i32) -> Self::Output

Returns self to the power rhs. Read more
source§

impl<'a, 'b> Pow<&'b i8> for &'a TwoFloat

§

type Output = TwoFloat

The result after applying the operator.
source§

fn pow(self, rhs: &'b i8) -> Self::Output

Returns self to the power rhs. Read more
source§

impl<'b> Pow<&'b i8> for TwoFloat

§

type Output = TwoFloat

The result after applying the operator.
source§

fn pow(self, rhs: &'b i8) -> Self::Output

Returns self to the power rhs. Read more
source§

impl<'a, 'b> Pow<&'b u16> for &'a TwoFloat

§

type Output = TwoFloat

The result after applying the operator.
source§

fn pow(self, rhs: &'b u16) -> Self::Output

Returns self to the power rhs. Read more
source§

impl<'b> Pow<&'b u16> for TwoFloat

§

type Output = TwoFloat

The result after applying the operator.
source§

fn pow(self, rhs: &'b u16) -> Self::Output

Returns self to the power rhs. Read more
source§

impl<'a, 'b> Pow<&'b u8> for &'a TwoFloat

§

type Output = TwoFloat

The result after applying the operator.
source§

fn pow(self, rhs: &'b u8) -> Self::Output

Returns self to the power rhs. Read more
source§

impl<'b> Pow<&'b u8> for TwoFloat

§

type Output = TwoFloat

The result after applying the operator.
source§

fn pow(self, rhs: &'b u8) -> Self::Output

Returns self to the power rhs. Read more
source§

impl<'a> Pow<TwoFloat> for &'a TwoFloat

§

type Output = TwoFloat

The result after applying the operator.
source§

fn pow(self, rhs: TwoFloat) -> Self::Output

Returns self to the power rhs. Read more
source§

impl Pow<TwoFloat> for TwoFloat

§

type Output = TwoFloat

The result after applying the operator.
source§

fn pow(self, rhs: TwoFloat) -> Self::Output

Returns self to the power rhs. Read more
source§

impl<'a> Pow<f64> for &'a TwoFloat

§

type Output = TwoFloat

The result after applying the operator.
source§

fn pow(self, rhs: f64) -> Self::Output

Returns self to the power rhs. Read more
source§

impl Pow<f64> for TwoFloat

§

type Output = TwoFloat

The result after applying the operator.
source§

fn pow(self, rhs: f64) -> Self::Output

Returns self to the power rhs. Read more
source§

impl<'a> Pow<i16> for &'a TwoFloat

§

type Output = TwoFloat

The result after applying the operator.
source§

fn pow(self, rhs: i16) -> Self::Output

Returns self to the power rhs. Read more
source§

impl Pow<i16> for TwoFloat

§

type Output = TwoFloat

The result after applying the operator.
source§

fn pow(self, rhs: i16) -> Self::Output

Returns self to the power rhs. Read more
source§

impl<'a> Pow<i32> for &'a TwoFloat

§

type Output = TwoFloat

The result after applying the operator.
source§

fn pow(self, rhs: i32) -> Self::Output

Returns self to the power rhs. Read more
source§

impl Pow<i32> for TwoFloat

§

type Output = TwoFloat

The result after applying the operator.
source§

fn pow(self, rhs: i32) -> Self::Output

Returns self to the power rhs. Read more
source§

impl<'a> Pow<i8> for &'a TwoFloat

§

type Output = TwoFloat

The result after applying the operator.
source§

fn pow(self, rhs: i8) -> Self::Output

Returns self to the power rhs. Read more
source§

impl Pow<i8> for TwoFloat

§

type Output = TwoFloat

The result after applying the operator.
source§

fn pow(self, rhs: i8) -> Self::Output

Returns self to the power rhs. Read more
source§

impl<'a> Pow<u16> for &'a TwoFloat

§

type Output = TwoFloat

The result after applying the operator.
source§

fn pow(self, rhs: u16) -> Self::Output

Returns self to the power rhs. Read more
source§

impl Pow<u16> for TwoFloat

§

type Output = TwoFloat

The result after applying the operator.
source§

fn pow(self, rhs: u16) -> Self::Output

Returns self to the power rhs. Read more
source§

impl<'a> Pow<u8> for &'a TwoFloat

§

type Output = TwoFloat

The result after applying the operator.
source§

fn pow(self, rhs: u8) -> Self::Output

Returns self to the power rhs. Read more
source§

impl Pow<u8> for TwoFloat

§

type Output = TwoFloat

The result after applying the operator.
source§

fn pow(self, rhs: u8) -> Self::Output

Returns self to the power rhs. Read more
source§

impl<'a, 'b> Rem<&'b TwoFloat> for &'a TwoFloat

§

type Output = TwoFloat

The resulting type after applying the % operator.
source§

fn rem(self, rhs: &'b TwoFloat) -> Self::Output

Performs the % operation. Read more
source§

impl<'a, 'b> Rem<&'b TwoFloat> for &'a f64

§

type Output = TwoFloat

The resulting type after applying the % operator.
source§

fn rem(self, rhs: &'b TwoFloat) -> Self::Output

Performs the % operation. Read more
source§

impl<'b> Rem<&'b TwoFloat> for TwoFloat

§

type Output = TwoFloat

The resulting type after applying the % operator.
source§

fn rem(self, rhs: &'b TwoFloat) -> Self::Output

Performs the % operation. Read more
source§

impl<'b> Rem<&'b TwoFloat> for f64

§

type Output = TwoFloat

The resulting type after applying the % operator.
source§

fn rem(self, rhs: &'b TwoFloat) -> Self::Output

Performs the % operation. Read more
source§

impl<'a, 'b> Rem<&'b f64> for &'a TwoFloat

§

type Output = TwoFloat

The resulting type after applying the % operator.
source§

fn rem(self, rhs: &'b f64) -> Self::Output

Performs the % operation. Read more
source§

impl<'b> Rem<&'b f64> for TwoFloat

§

type Output = TwoFloat

The resulting type after applying the % operator.
source§

fn rem(self, rhs: &'b f64) -> Self::Output

Performs the % operation. Read more
source§

impl<'a> Rem<TwoFloat> for &'a TwoFloat

§

type Output = TwoFloat

The resulting type after applying the % operator.
source§

fn rem(self, rhs: TwoFloat) -> Self::Output

Performs the % operation. Read more
source§

impl<'a> Rem<TwoFloat> for &'a f64

§

type Output = TwoFloat

The resulting type after applying the % operator.
source§

fn rem(self, rhs: TwoFloat) -> Self::Output

Performs the % operation. Read more
source§

impl Rem<TwoFloat> for TwoFloat

§

type Output = TwoFloat

The resulting type after applying the % operator.
source§

fn rem(self, rhs: TwoFloat) -> Self::Output

Performs the % operation. Read more
source§

impl Rem<TwoFloat> for f64

§

type Output = TwoFloat

The resulting type after applying the % operator.
source§

fn rem(self, rhs: TwoFloat) -> Self::Output

Performs the % operation. Read more
source§

impl<'a> Rem<f64> for &'a TwoFloat

§

type Output = TwoFloat

The resulting type after applying the % operator.
source§

fn rem(self, rhs: f64) -> Self::Output

Performs the % operation. Read more
source§

impl Rem<f64> for TwoFloat

§

type Output = TwoFloat

The resulting type after applying the % operator.
source§

fn rem(self, rhs: f64) -> Self::Output

Performs the % operation. Read more
source§

impl<'a> RemAssign<&'a TwoFloat> for TwoFloat

source§

fn rem_assign(&mut self, rhs: &'a TwoFloat)

Performs the %= operation. Read more
source§

impl<'b> RemAssign<&'b f64> for TwoFloat

source§

fn rem_assign(&mut self, rhs: &'b f64)

Performs the %= operation. Read more
source§

impl<'a> RemAssign<TwoFloat> for TwoFloat

source§

fn rem_assign(&mut self, rhs: TwoFloat)

Performs the %= operation. Read more
source§

impl<'b> RemAssign<f64> for TwoFloat

source§

fn rem_assign(&mut self, rhs: f64)

Performs the %= operation. Read more
source§

impl Serialize for TwoFloat

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 Signed for TwoFloat

source§

fn abs(&self) -> Self

Computes the absolute value. Read more
source§

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

The positive difference of two numbers. Read more
source§

fn signum(&self) -> Self

Returns the sign of the number. Read more
source§

fn is_positive(&self) -> bool

Returns true if the number is positive and false if the number is zero or negative.
source§

fn is_negative(&self) -> bool

Returns true if the number is negative and false if the number is zero or positive.
source§

impl<'a, 'b> Sub<&'b TwoFloat> for &'a TwoFloat

source§

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

Implements subtraction of two TwoFloat values using Joldes et al. (2017) Algorithm 6 modified for a negative right-hand side.

§

type Output = TwoFloat

The resulting type after applying the - operator.
source§

impl<'a, 'b> Sub<&'b TwoFloat> for &'a f64

source§

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

Implements subtraction of f64 and TwoFloat using Joldes et al. (2017) Algorithm 4 modified for negative left-hand side.

§

type Output = TwoFloat

The resulting type after applying the - operator.
source§

impl<'b> Sub<&'b TwoFloat> for TwoFloat

source§

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

Implements subtraction of two TwoFloat values using Joldes et al. (2017) Algorithm 6 modified for a negative right-hand side.

§

type Output = TwoFloat

The resulting type after applying the - operator.
source§

impl<'b> Sub<&'b TwoFloat> for f64

source§

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

Implements subtraction of f64 and TwoFloat using Joldes et al. (2017) Algorithm 4 modified for negative left-hand side.

§

type Output = TwoFloat

The resulting type after applying the - operator.
source§

impl<'a, 'b> Sub<&'b f64> for &'a TwoFloat

source§

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

Implements subtraction of TwoFloat and f64 using Joldes et al. (2017) Algorithm 4 modified for negative right-hand side.

§

type Output = TwoFloat

The resulting type after applying the - operator.
source§

impl<'b> Sub<&'b f64> for TwoFloat

source§

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

Implements subtraction of TwoFloat and f64 using Joldes et al. (2017) Algorithm 4 modified for negative right-hand side.

§

type Output = TwoFloat

The resulting type after applying the - operator.
source§

impl<'a> Sub<TwoFloat> for &'a TwoFloat

source§

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

Implements subtraction of two TwoFloat values using Joldes et al. (2017) Algorithm 6 modified for a negative right-hand side.

§

type Output = TwoFloat

The resulting type after applying the - operator.
source§

impl<'a> Sub<TwoFloat> for &'a f64

source§

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

Implements subtraction of f64 and TwoFloat using Joldes et al. (2017) Algorithm 4 modified for negative left-hand side.

§

type Output = TwoFloat

The resulting type after applying the - operator.
source§

impl Sub<TwoFloat> for TwoFloat

source§

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

Implements subtraction of two TwoFloat values using Joldes et al. (2017) Algorithm 6 modified for a negative right-hand side.

§

type Output = TwoFloat

The resulting type after applying the - operator.
source§

impl Sub<TwoFloat> for f64

source§

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

Implements subtraction of f64 and TwoFloat using Joldes et al. (2017) Algorithm 4 modified for negative left-hand side.

§

type Output = TwoFloat

The resulting type after applying the - operator.
source§

impl<'a> Sub<f64> for &'a TwoFloat

source§

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

Implements subtraction of TwoFloat and f64 using Joldes et al. (2017) Algorithm 4 modified for negative right-hand side.

§

type Output = TwoFloat

The resulting type after applying the - operator.
source§

impl Sub<f64> for TwoFloat

source§

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

Implements subtraction of TwoFloat and f64 using Joldes et al. (2017) Algorithm 4 modified for negative right-hand side.

§

type Output = TwoFloat

The resulting type after applying the - operator.
source§

impl<'a> SubAssign<&'a TwoFloat> for TwoFloat

source§

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

Implements subtraction of two TwoFloat values using Joldes et al. (2017) Algorithm 6 modified for a negative right-hand side.

source§

impl<'a> SubAssign<&'a f64> for TwoFloat

source§

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

Implements subtraction of TwoFloat and f64 using Joldes et al. (2017) Algorithm 4 modified for negative right-hand side.

source§

impl<'a> SubAssign<TwoFloat> for TwoFloat

source§

fn sub_assign(&mut self, rhs: TwoFloat)

Implements subtraction of two TwoFloat values using Joldes et al. (2017) Algorithm 6 modified for a negative right-hand side.

source§

impl<'a> SubAssign<f64> for TwoFloat

source§

fn sub_assign(&mut self, rhs: f64)

Implements subtraction of TwoFloat and f64 using Joldes et al. (2017) Algorithm 4 modified for negative right-hand side.

source§

impl ToPrimitive for TwoFloat

source§

fn to_i8(&self) -> Option<i8>

Converts the value of self to an i8. If the value cannot be represented by an i8, then None is returned.
source§

fn to_i16(&self) -> Option<i16>

Converts the value of self to an i16. If the value cannot be represented by an i16, then None is returned.
source§

fn to_i32(&self) -> Option<i32>

Converts the value of self to an i32. If the value cannot be represented by an i32, then None is returned.
source§

fn to_i64(&self) -> Option<i64>

Converts the value of self to an i64. If the value cannot be represented by an i64, then None is returned.
source§

fn to_i128(&self) -> Option<i128>

Converts the value of self to an i128. If the value cannot be represented by an i128 (i64 under the default implementation), then None is returned. Read more
source§

fn to_isize(&self) -> Option<isize>

Converts the value of self to an isize. If the value cannot be represented by an isize, then None is returned.
source§

fn to_u8(&self) -> Option<u8>

Converts the value of self to a u8. If the value cannot be represented by a u8, then None is returned.
source§

fn to_u16(&self) -> Option<u16>

Converts the value of self to a u16. If the value cannot be represented by a u16, then None is returned.
source§

fn to_u32(&self) -> Option<u32>

Converts the value of self to a u32. If the value cannot be represented by a u32, then None is returned.
source§

fn to_u64(&self) -> Option<u64>

Converts the value of self to a u64. If the value cannot be represented by a u64, then None is returned.
source§

fn to_u128(&self) -> Option<u128>

Converts the value of self to a u128. If the value cannot be represented by a u128 (u64 under the default implementation), then None is returned. Read more
source§

fn to_usize(&self) -> Option<usize>

Converts the value of self to a usize. If the value cannot be represented by a usize, then None is returned.
source§

fn to_f32(&self) -> Option<f32>

Converts the value of self to an f32. Overflows may map to positive or negative inifinity, otherwise None is returned if the value cannot be represented by an f32.
source§

fn to_f64(&self) -> Option<f64>

Converts the value of self to an f64. Overflows may map to positive or negative inifinity, otherwise None is returned if the value cannot be represented by an f64. Read more
source§

impl<'a> TryFrom<&'a TwoFloat> for i128

§

type Error = TwoFloatError

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

fn try_from(value: &'a TwoFloat) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<&'a TwoFloat> for i16

§

type Error = TwoFloatError

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

fn try_from(value: &'a TwoFloat) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<&'a TwoFloat> for i32

§

type Error = TwoFloatError

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

fn try_from(value: &'a TwoFloat) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<&'a TwoFloat> for i64

§

type Error = TwoFloatError

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

fn try_from(value: &'a TwoFloat) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<&'a TwoFloat> for i8

§

type Error = TwoFloatError

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

fn try_from(value: &'a TwoFloat) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<&'a TwoFloat> for u128

§

type Error = TwoFloatError

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

fn try_from(value: &'a TwoFloat) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<&'a TwoFloat> for u16

§

type Error = TwoFloatError

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

fn try_from(value: &'a TwoFloat) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<&'a TwoFloat> for u32

§

type Error = TwoFloatError

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

fn try_from(value: &'a TwoFloat) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<&'a TwoFloat> for u64

§

type Error = TwoFloatError

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

fn try_from(value: &'a TwoFloat) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<&'a TwoFloat> for u8

§

type Error = TwoFloatError

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

fn try_from(value: &'a TwoFloat) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<[f64; 2]> for TwoFloat

§

type Error = TwoFloatError

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

fn try_from(value: [f64; 2]) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<(f64, f64)> for TwoFloat

§

type Error = TwoFloatError

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

fn try_from(value: (f64, f64)) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<TwoFloat> for i128

§

type Error = TwoFloatError

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

fn try_from(value: TwoFloat) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<TwoFloat> for i16

§

type Error = TwoFloatError

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

fn try_from(value: TwoFloat) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<TwoFloat> for i32

§

type Error = TwoFloatError

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

fn try_from(value: TwoFloat) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<TwoFloat> for i64

§

type Error = TwoFloatError

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

fn try_from(value: TwoFloat) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<TwoFloat> for i8

§

type Error = TwoFloatError

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

fn try_from(value: TwoFloat) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<TwoFloat> for u128

§

type Error = TwoFloatError

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

fn try_from(value: TwoFloat) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<TwoFloat> for u16

§

type Error = TwoFloatError

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

fn try_from(value: TwoFloat) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<TwoFloat> for u32

§

type Error = TwoFloatError

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

fn try_from(value: TwoFloat) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<TwoFloat> for u64

§

type Error = TwoFloatError

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

fn try_from(value: TwoFloat) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<TwoFloat> for u8

§

type Error = TwoFloatError

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

fn try_from(value: TwoFloat) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl UpperExp for TwoFloat

source§

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

Formats the value using the given formatter.
source§

impl Zero for TwoFloat

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 Copy for TwoFloat

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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> LowerBounded for Twhere T: Bounded,

source§

fn min_value() -> T

Returns the smallest finite number this type can represent
source§

impl<T> Real for Twhere T: Float,

source§

fn min_value() -> T

Returns the smallest finite value that this type can represent. Read more
source§

fn min_positive_value() -> T

Returns the smallest positive, normalized value that this type can represent. Read more
source§

fn epsilon() -> T

Returns epsilon, a small positive value. Read more
source§

fn max_value() -> T

Returns the largest finite value that this type can represent. Read more
source§

fn floor(self) -> T

Returns the largest integer less than or equal to a number. Read more
source§

fn ceil(self) -> T

Returns the smallest integer greater than or equal to a number. Read more
source§

fn round(self) -> T

Returns the nearest integer to a number. Round half-way cases away from 0.0. Read more
source§

fn trunc(self) -> T

Return the integer part of a number. Read more
source§

fn fract(self) -> T

Returns the fractional part of a number. Read more
source§

fn abs(self) -> T

Computes the absolute value of self. Returns Float::nan() if the number is Float::nan(). Read more
source§

fn signum(self) -> T

Returns a number that represents the sign of self. Read more
source§

fn is_sign_positive(self) -> bool

Returns true if self is positive, including +0.0, Float::infinity(), and with newer versions of Rust f64::NAN. Read more
source§

fn is_sign_negative(self) -> bool

Returns true if self is negative, including -0.0, Float::neg_infinity(), and with newer versions of Rust -f64::NAN. Read more
source§

fn mul_add(self, a: T, b: T) -> T

Fused multiply-add. Computes (self * a) + b with only one rounding error, yielding a more accurate result than an unfused multiply-add. Read more
source§

fn recip(self) -> T

Take the reciprocal (inverse) of a number, 1/x. Read more
source§

fn powi(self, n: i32) -> T

Raise a number to an integer power. Read more
source§

fn powf(self, n: T) -> T

Raise a number to a real number power. Read more
source§

fn sqrt(self) -> T

Take the square root of a number. Read more
source§

fn exp(self) -> T

Returns e^(self), (the exponential function). Read more
source§

fn exp2(self) -> T

Returns 2^(self). Read more
source§

fn ln(self) -> T

Returns the natural logarithm of the number. Read more
source§

fn log(self, base: T) -> T

Returns the logarithm of the number with respect to an arbitrary base. Read more
source§

fn log2(self) -> T

Returns the base 2 logarithm of the number. Read more
source§

fn log10(self) -> T

Returns the base 10 logarithm of the number. Read more
source§

fn to_degrees(self) -> T

Converts radians to degrees. Read more
source§

fn to_radians(self) -> T

Converts degrees to radians. Read more
source§

fn max(self, other: T) -> T

Returns the maximum of the two numbers. Read more
source§

fn min(self, other: T) -> T

Returns the minimum of the two numbers. Read more
source§

fn abs_sub(self, other: T) -> T

The positive difference of two numbers. Read more
source§

fn cbrt(self) -> T

Take the cubic root of a number. Read more
source§

fn hypot(self, other: T) -> T

Calculate the length of the hypotenuse of a right-angle triangle given legs of length x and y. Read more
source§

fn sin(self) -> T

Computes the sine of a number (in radians). Read more
source§

fn cos(self) -> T

Computes the cosine of a number (in radians). Read more
source§

fn tan(self) -> T

Computes the tangent of a number (in radians). Read more
source§

fn asin(self) -> T

Computes the arcsine of a number. Return value is in radians in the range [-pi/2, pi/2] or NaN if the number is outside the range [-1, 1]. Read more
source§

fn acos(self) -> T

Computes the arccosine of a number. Return value is in radians in the range [0, pi] or NaN if the number is outside the range [-1, 1]. Read more
source§

fn atan(self) -> T

Computes the arctangent of a number. Return value is in radians in the range [-pi/2, pi/2]; Read more
source§

fn atan2(self, other: T) -> T

Computes the four quadrant arctangent of self (y) and other (x). Read more
source§

fn sin_cos(self) -> (T, T)

Simultaneously computes the sine and cosine of the number, x. Returns (sin(x), cos(x)). Read more
source§

fn exp_m1(self) -> T

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

fn ln_1p(self) -> T

Returns ln(1+n) (natural logarithm) more accurately than if the operations were performed separately. Read more
source§

fn sinh(self) -> T

Hyperbolic sine function. Read more
source§

fn cosh(self) -> T

Hyperbolic cosine function. Read more
source§

fn tanh(self) -> T

Hyperbolic tangent function. Read more
source§

fn asinh(self) -> T

Inverse hyperbolic sine function. Read more
source§

fn acosh(self) -> T

Inverse hyperbolic cosine function. Read more
source§

fn atanh(self) -> T

Inverse hyperbolic tangent function. Read more
source§

impl<T> ToOwned for Twhere T: Clone,

§

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 Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

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

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

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

impl<T> UpperBounded for Twhere T: Bounded,

source§

fn max_value() -> T

Returns the largest finite number this type can represent
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,

source§

impl<T> NumAssign for Twhere T: Num + NumAssignOps<T>,

source§

impl<T, Rhs> NumAssignOps<Rhs> for Twhere T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,

source§

impl<T> NumAssignRef for Twhere T: NumAssign + for<'r> NumAssignOps<&'r T>,

source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for Twhere T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,

source§

impl<T> NumRef for Twhere T: Num + for<'r> NumOps<&'r T, T>,

source§

impl<T, Base> RefNum<Base> for Twhere T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base>,