[][src]Struct twofloat::TwoFloat

pub struct TwoFloat { /* fields omitted */ }

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

Implementations

impl TwoFloat[src]

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

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

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

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

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

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

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

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.

impl TwoFloat[src]

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

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));

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

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));

impl TwoFloat[src]

pub fn hi(&self) -> f64[src]

Returns the high word of self.

Examples

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

pub fn lo(&self) -> f64[src]

Returns the low word of self.

Examples

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

pub fn is_valid(&self) -> bool[src]

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);

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

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);

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

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);

pub const NAN: Self[src]

Represents an error value equivalent to f64::NAN.

impl TwoFloat[src]

pub fn exp(self) -> Self[src]

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);

pub fn exp_m1(self) -> Self[src]

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);

pub fn exp2(self) -> Self[src]

Returns 2^(self).

Examples

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

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

pub fn ln(self) -> Self[src]

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);

pub fn ln_1p(self) -> Self[src]

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);

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

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);

pub fn log2(self) -> Self[src]

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);

pub fn log10(self) -> Self[src]

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);

impl TwoFloat[src]

pub fn fract(self) -> Self[src]

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));

pub fn trunc(self) -> Self[src]

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));

pub fn ceil(self) -> Self[src]

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));

pub fn floor(self) -> Self[src]

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));

pub fn round(self) -> Self[src]

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));

impl TwoFloat[src]

pub fn cosh(self) -> Self[src]

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);

pub fn sinh(self) -> Self[src]

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);

pub fn tanh(self) -> Self[src]

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);

pub fn acosh(self) -> Self[src]

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);

pub fn asinh(self) -> Self[src]

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);

pub fn atanh(self) -> Self[src]

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);

impl TwoFloat[src]

pub fn recip(self) -> Self[src]

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);

pub fn sqrt(self) -> Self[src]

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);

pub fn cbrt(self) -> Self[src]

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);

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

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);

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

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());

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

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);

impl TwoFloat[src]

pub fn abs(self) -> Self[src]

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));

pub fn is_sign_positive(&self) -> bool[src]

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);

pub fn is_sign_negative(&self) -> bool[src]

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);

pub fn copysign(self, sign: Self) -> Self[src]

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);

pub fn signum(self) -> Self[src]

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);

impl TwoFloat[src]

pub fn to_radians(self) -> Self[src]

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);

pub fn to_degrees(self) -> Self[src]

Converts radians to degrees.

Examples

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

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

pub fn sin(self) -> Self[src]

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);

pub fn cos(self) -> Self[src]

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);

pub fn sin_cos(self) -> (Self, Self)[src]

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);

pub fn tan(self) -> Self[src]

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);

pub fn asin(self) -> Self[src]

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);

pub fn acos(self) -> Self[src]

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);

pub fn atan(self) -> Self[src]

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);

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

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

impl<'a> Add<&'a TwoFloat> for f64[src]

type Output = TwoFloat

The resulting type after applying the + operator.

fn add(self, lhs: &'a TwoFloat) -> Self::Output[src]

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

impl<'a> Add<&'a TwoFloat> for TwoFloat[src]

type Output = TwoFloat

The resulting type after applying the + operator.

fn add(self, rhs: &'a TwoFloat) -> Self::Output[src]

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

impl<'a, 'b> Add<&'b TwoFloat> for &'a TwoFloat[src]

type Output = TwoFloat

The resulting type after applying the + operator.

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

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

impl Add<TwoFloat> for f64[src]

type Output = TwoFloat

The resulting type after applying the + operator.

fn add(self, lhs: TwoFloat) -> Self::Output[src]

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

impl Add<TwoFloat> for TwoFloat[src]

type Output = TwoFloat

The resulting type after applying the + operator.

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

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

impl<'a> Add<TwoFloat> for &'a TwoFloat[src]

type Output = TwoFloat

The resulting type after applying the + operator.

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

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

impl Add<f64> for TwoFloat[src]

type Output = TwoFloat

The resulting type after applying the + operator.

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

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

impl<'a> Add<f64> for &'a TwoFloat[src]

type Output = TwoFloat

The resulting type after applying the + operator.

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

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

impl<'a> AddAssign<&'a TwoFloat> for TwoFloat[src]

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

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

impl AddAssign<TwoFloat> for TwoFloat[src]

fn add_assign(&mut self, rhs: TwoFloat)[src]

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

impl AddAssign<f64> for TwoFloat[src]

fn add_assign(&mut self, rhs: f64)[src]

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

impl Clone for TwoFloat[src]

impl Copy for TwoFloat[src]

impl Debug for TwoFloat[src]

impl Display for TwoFloat[src]

impl<'a> Div<&'a TwoFloat> for f64[src]

type Output = TwoFloat

The resulting type after applying the / operator.

fn div(self, rhs: &'a TwoFloat) -> Self::Output[src]

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.

impl<'a> Div<&'a TwoFloat> for TwoFloat[src]

type Output = TwoFloat

The resulting type after applying the / operator.

fn div(self, rhs: &'a TwoFloat) -> Self::Output[src]

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

impl<'a, 'b> Div<&'b TwoFloat> for &'a TwoFloat[src]

type Output = TwoFloat

The resulting type after applying the / operator.

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

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

impl Div<TwoFloat> for f64[src]

type Output = TwoFloat

The resulting type after applying the / operator.

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

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.

impl Div<TwoFloat> for TwoFloat[src]

type Output = TwoFloat

The resulting type after applying the / operator.

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

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

impl<'a> Div<TwoFloat> for &'a TwoFloat[src]

type Output = TwoFloat

The resulting type after applying the / operator.

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

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

impl Div<f64> for TwoFloat[src]

type Output = TwoFloat

The resulting type after applying the / operator.

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

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

impl<'a> Div<f64> for &'a TwoFloat[src]

type Output = TwoFloat

The resulting type after applying the / operator.

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

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

impl<'a> DivAssign<&'a TwoFloat> for TwoFloat[src]

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

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

impl DivAssign<TwoFloat> for TwoFloat[src]

fn div_assign(&mut self, rhs: TwoFloat)[src]

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

impl DivAssign<f64> for TwoFloat[src]

fn div_assign(&mut self, rhs: f64)[src]

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

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

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

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

impl<'a> From<&'a TwoFloat> for f32[src]

impl From<TwoFloat> for (f64, f64)[src]

impl From<TwoFloat> for [f64; 2][src]

impl From<TwoFloat> for f64[src]

impl From<TwoFloat> for f32[src]

impl From<f32> for TwoFloat[src]

impl From<f64> for TwoFloat[src]

impl From<i128> for TwoFloat[src]

impl From<i16> for TwoFloat[src]

impl From<i32> for TwoFloat[src]

impl From<i64> for TwoFloat[src]

impl From<i8> for TwoFloat[src]

impl From<u128> for TwoFloat[src]

impl From<u16> for TwoFloat[src]

impl From<u32> for TwoFloat[src]

impl From<u64> for TwoFloat[src]

impl From<u8> for TwoFloat[src]

impl LowerExp for TwoFloat[src]

impl<'a> Mul<&'a TwoFloat> for f64[src]

type Output = TwoFloat

The resulting type after applying the * operator.

fn mul(self, lhs: &'a TwoFloat) -> Self::Output[src]

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

impl<'a> Mul<&'a TwoFloat> for TwoFloat[src]

type Output = TwoFloat

The resulting type after applying the * operator.

fn mul(self, rhs: &'a TwoFloat) -> Self::Output[src]

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

impl<'a, 'b> Mul<&'b TwoFloat> for &'a TwoFloat[src]

type Output = TwoFloat

The resulting type after applying the * operator.

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

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

impl Mul<TwoFloat> for f64[src]

type Output = TwoFloat

The resulting type after applying the * operator.

fn mul(self, lhs: TwoFloat) -> Self::Output[src]

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

impl Mul<TwoFloat> for TwoFloat[src]

type Output = TwoFloat

The resulting type after applying the * operator.

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

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

impl<'a> Mul<TwoFloat> for &'a TwoFloat[src]

type Output = TwoFloat

The resulting type after applying the * operator.

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

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

impl Mul<f64> for TwoFloat[src]

type Output = TwoFloat

The resulting type after applying the * operator.

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

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

impl<'a> Mul<f64> for &'a TwoFloat[src]

type Output = TwoFloat

The resulting type after applying the * operator.

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

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

impl<'a> MulAssign<&'a TwoFloat> for TwoFloat[src]

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

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

impl MulAssign<TwoFloat> for TwoFloat[src]

fn mul_assign(&mut self, rhs: TwoFloat)[src]

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

impl MulAssign<f64> for TwoFloat[src]

fn mul_assign(&mut self, rhs: f64)[src]

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

impl Neg for TwoFloat[src]

type Output = TwoFloat

The resulting type after applying the - operator.

fn neg(self) -> Self::Output[src]

Returns a new TwoFloat with the negated value of self.

impl<'a> Neg for &'a TwoFloat[src]

type Output = TwoFloat

The resulting type after applying the - operator.

fn neg(self) -> Self::Output[src]

Returns a new TwoFloat with the negated value of self.

impl PartialEq<TwoFloat> for TwoFloat[src]

impl PartialEq<TwoFloat> for f64[src]

impl PartialEq<f64> for TwoFloat[src]

impl PartialOrd<TwoFloat> for TwoFloat[src]

impl PartialOrd<TwoFloat> for f64[src]

impl PartialOrd<f64> for TwoFloat[src]

impl<'a> Rem<&'a TwoFloat> for f64[src]

type Output = TwoFloat

The resulting type after applying the % operator.

impl<'a> Rem<&'a TwoFloat> for TwoFloat[src]

type Output = TwoFloat

The resulting type after applying the % operator.

impl<'a, 'b> Rem<&'b TwoFloat> for &'a TwoFloat[src]

type Output = TwoFloat

The resulting type after applying the % operator.

impl Rem<TwoFloat> for f64[src]

type Output = TwoFloat

The resulting type after applying the % operator.

impl Rem<TwoFloat> for TwoFloat[src]

type Output = TwoFloat

The resulting type after applying the % operator.

impl<'a> Rem<TwoFloat> for &'a TwoFloat[src]

type Output = TwoFloat

The resulting type after applying the % operator.

impl Rem<f64> for TwoFloat[src]

type Output = TwoFloat

The resulting type after applying the % operator.

impl<'a> Rem<f64> for &'a TwoFloat[src]

type Output = TwoFloat

The resulting type after applying the % operator.

impl<'a> RemAssign<&'a TwoFloat> for TwoFloat[src]

impl RemAssign<TwoFloat> for TwoFloat[src]

impl RemAssign<f64> for TwoFloat[src]

impl StructuralPartialEq for TwoFloat[src]

impl<'a> Sub<&'a TwoFloat> for f64[src]

type Output = TwoFloat

The resulting type after applying the - operator.

fn sub(self, rhs: &'a TwoFloat) -> Self::Output[src]

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

impl<'a> Sub<&'a TwoFloat> for TwoFloat[src]

type Output = TwoFloat

The resulting type after applying the - operator.

fn sub(self, rhs: &'a TwoFloat) -> Self::Output[src]

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

impl<'a, 'b> Sub<&'b TwoFloat> for &'a TwoFloat[src]

type Output = TwoFloat

The resulting type after applying the - operator.

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

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

impl Sub<TwoFloat> for f64[src]

type Output = TwoFloat

The resulting type after applying the - operator.

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

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

impl Sub<TwoFloat> for TwoFloat[src]

type Output = TwoFloat

The resulting type after applying the - operator.

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

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

impl<'a> Sub<TwoFloat> for &'a TwoFloat[src]

type Output = TwoFloat

The resulting type after applying the - operator.

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

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

impl Sub<f64> for TwoFloat[src]

type Output = TwoFloat

The resulting type after applying the - operator.

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

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

impl<'a> Sub<f64> for &'a TwoFloat[src]

type Output = TwoFloat

The resulting type after applying the - operator.

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

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

impl<'a> SubAssign<&'a TwoFloat> for TwoFloat[src]

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

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

impl SubAssign<TwoFloat> for TwoFloat[src]

fn sub_assign(&mut self, rhs: TwoFloat)[src]

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

impl SubAssign<f64> for TwoFloat[src]

fn sub_assign(&mut self, rhs: f64)[src]

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

impl<'a> TryFrom<&'a TwoFloat> for i32[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a TwoFloat> for i16[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a TwoFloat> for i8[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a TwoFloat> for u32[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a TwoFloat> for u16[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a TwoFloat> for u8[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a TwoFloat> for i128[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a TwoFloat> for i64[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a TwoFloat> for u128[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a TwoFloat> for u64[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<[f64; 2]> for TwoFloat[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<(f64, f64)> for TwoFloat[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<TwoFloat> for i32[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<TwoFloat> for i16[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<TwoFloat> for i8[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<TwoFloat> for u32[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<TwoFloat> for u16[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<TwoFloat> for u8[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<TwoFloat> for i128[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<TwoFloat> for i64[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<TwoFloat> for u128[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<TwoFloat> for u64[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl UpperExp for TwoFloat[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.