Struct rug::Float
[−]
[src]
pub struct Float { /* fields omitted */ }
A multi-precision floating-point number with arbitrarily large precision and correct rounding
The precision has to be set during construction. The rounding method of the required operations can be specified, and the direction of the rounding is returned.
There are two versions of most methods:
- The first rounds the returned or stored
Float
to the nearest representable value. - The second applies the specified rounding
method, and returns the rounding
direction:
Ordering::Less
if the returned/storedFloat
is less than the exact result,Ordering::Equal
if the returned/storedFloat
is equal to the exact result,Ordering::Greater
if the returned/storedFloat
is greater than the exact result,
Examples
use rug::Float; use rug::float::Round; use rug::ops::DivAssignRound; use std::cmp::Ordering; // A precision of 32 significant bits is specified here. // (The primitive `f32` has a precision of 24 and // `f64` has a precision of 53.) let mut two_thirds_down = Float::with_val(32, 2.0); let dir = two_thirds_down.div_assign_round(3.0, Round::Down); // since we rounded down, direction is Ordering::Less assert_eq!(dir, Ordering::Less); let mut two_thirds_up = Float::with_val(32, 2.0); let dir = two_thirds_up.div_assign_round(3.0, Round::Up); // since we rounded up, direction is Ordering::Greater assert_eq!(dir, Ordering::Greater); let diff_expected = 2.0_f64.powi(-32); let diff = two_thirds_up - two_thirds_down; assert_eq!(diff, diff_expected);
The following example is a translation of the MPFR sample found on the MPFR website. The program computes a lower bound on 1 + 1/1! + 1/2! + … + 1/100! using 200-bit precision. The program writes:
Sum is 2.7182818284590452353602874713526624977572470936999595749669131
extern crate rug; use rug::{AssignRound, Float}; use rug::float::Round; use rug::ops::{AddAssignRound, MulAssignRound}; fn main() { let mut t = Float::with_val(200, 1.0); let mut s = Float::with_val(200, 1.0); let mut u = Float::new(200); for i in 1..101_u32 { // multiply t by i in place, round towards plus infinity t.mul_assign_round(i, Round::Up); // set u to 1/t, round towards minus infinity u.assign_round(t.recip_ref(), Round::Down); // increase s by u in place, round towards minus infinity s.add_assign_round(&u, Round::Down); } // `None` means the number of printed digits depends on the precision let sr = s.to_string_radix_round(10, None, Round::Down); println!("Sum is {}", sr); }
Methods
impl Float
[src]
fn new(prec: u32) -> Float
Create a new floating-point number with the specified precision and with value 0.
Examples
use rug::Float; let f = Float::new(53); assert_eq!(f.prec(), 53); assert_eq!(f, 0);
Panics
Panics if prec
is out of the allowed range.
fn with_val<T>(prec: u32, val: T) -> Float where
Float: Assign<T>,
Float: Assign<T>,
Create a new floating-point number with the specified precision and with the given value, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.3); assert_eq!(f.prec(), 53); assert_eq!(f, 1.3);
Panics
Panics if prec
is out of the allowed range.
fn with_val_round<T>(prec: u32, val: T, round: Round) -> (Float, Ordering) where
Float: AssignRound<T, Round = Round, Ordering = Ordering>,
Float: AssignRound<T, Round = Round, Ordering = Ordering>,
Create a new floating-point number with the specified precision and with the given value, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; let (f1, dir) = Float::with_val_round(4, 3.3, Round::Nearest); // 3.3 with precision 4 is rounded down to 3.25 assert_eq!(f1.prec(), 4); assert_eq!(f1, 3.25); assert_eq!(dir, Ordering::Less); let (f2, dir) = Float::with_val_round(4, 3.3, Round::Up); // 3.3 rounded up to 3.5 assert_eq!(f2.prec(), 4); assert_eq!(f2, 3.5); assert_eq!(dir, Ordering::Greater);
Panics
Panics if prec
is out of the allowed range.
fn prec(&self) -> u32
Returns the precision.
fn set_prec(&mut self, prec: u32)
fn set_prec_round(&mut self, prec: u32, round: Round) -> Ordering
Sets the precision, applying the specified rounding method.
Panics
Panics if prec
is out of the allowed range.
fn from_str(src: &str, prec: u32) -> Result<Float, ParseFloatError>
Parses a Float
with the specified precision, rounding to the
nearest.
See the corresponding assignment.
fn from_str_round(
src: &str,
prec: u32,
round: Round
) -> Result<(Float, Ordering), ParseFloatError>
src: &str,
prec: u32,
round: Round
) -> Result<(Float, Ordering), ParseFloatError>
Parses a Float
with the specified precision, applying the
specified rounding.
See the corresponding assignment.
fn from_str_radix(
src: &str,
radix: i32,
prec: u32
) -> Result<Float, ParseFloatError>
src: &str,
radix: i32,
prec: u32
) -> Result<Float, ParseFloatError>
Parses a Float
with the specified radix and precision,
rounding to the nearest.
See the corresponding assignment.
Panics
Panics if radix
is less than 2 or greater than 36.
fn from_str_radix_round(
src: &str,
radix: i32,
prec: u32,
round: Round
) -> Result<(Float, Ordering), ParseFloatError>
src: &str,
radix: i32,
prec: u32,
round: Round
) -> Result<(Float, Ordering), ParseFloatError>
Parses a Float
with the specified radix and precision,
applying the specified rounding.
See the corresponding assignment.
Panics
Panics if radix
is less than 2 or greater than 36.
fn valid_str_radix(src: &str, radix: i32) -> Result<ValidFloat, ParseFloatError>
Checks if a Float
can be parsed.
If this method does not return an error, neither will any
other function that parses a Float
. If this method returns
an error, the other functions will return the same error.
The string can start with an optional minus or plus sign. Whitespace is not allowed anywhere in the string, including in the beginning and end.
Examples
use rug::Float; let valid1 = Float::valid_str_radix("12.23e-4", 4); let f1 = Float::with_val(53, valid1.unwrap()); assert_eq!(f1, (2.0 + 4.0 * 1.0 + 0.25 * (2.0 + 0.25 * 3.0)) / 256.0); let valid2 = Float::valid_str_radix("12.yz@2", 36); let f2 = Float::with_val(53, valid2.unwrap()); assert_eq!(f2, 35 + 36 * (34 + 36 * (2 + 36 * 1))); let invalid = Float::valid_str_radix("ffe-2", 16); let invalid_f = Float::from_str_radix("ffe-2", 16, 53); assert_eq!(invalid.unwrap_err(), invalid_f.unwrap_err());
Panics
Panics if radix
is less than 2 or greater than 36.
fn to_integer(&self) -> Option<Integer>
Converts to an integer, rounding to the nearest.
fn to_integer_round(&self, round: Round) -> Option<(Integer, Ordering)>
Converts to an integer, applying the specified rounding method.
fn to_integer_exp(&self) -> Option<(Integer, i32)>
If the value is a finite number, returns
an Integer
and exponent such that
self
is exactly equal to the integer multiplied by two
raised to the power of the exponent.
Examples
use rug::{Assign, Float}; use rug::float::Special; let mut float = Float::with_val(16, 6.5); // 6.5 in binary is 110.1 // Since the precision is 16 bits, this becomes // 1101_0000_0000_0000 times two to the power of -12 let (int, exp) = float.to_integer_exp().unwrap(); assert_eq!(int, 0b1101_0000_0000_0000); assert_eq!(exp, -13); float.assign(0); let (zero, _) = float.to_integer_exp().unwrap(); assert_eq!(zero, 0); float.assign(Special::Infinity); assert!(float.to_integer_exp().is_none());
fn to_rational(&self) -> Option<Rational>
If the value is a finite number, returns
a Rational
number preserving all the
precision of the value.
Examples
use rug::{Float, Rational}; use rug::float::Round; use std::str::FromStr; use std::cmp::Ordering; // Consider the number 123,456,789 / 10,000,000,000. let res = Float::from_str_round("0.0123456789", 35, Round::Down); let (f, f_rounding) = res.unwrap(); assert_eq!(f_rounding, Ordering::Less); let r = Rational::from_str("123456789/10000000000").unwrap(); // Set fr to the value of f exactly. let fr = f.to_rational().unwrap(); // Since f == fr and f was rounded down, r != fr. assert_ne!(r, fr); let (frf, frf_rounding) = Float::with_val_round(35, &fr, Round::Down); assert_eq!(frf_rounding, Ordering::Equal); assert_eq!(frf, f); assert_eq!(format!("{:.9}", frf), "1.23456789e-2");
In the following example, the Float
values can be
represented exactly.
use rug::Float; let large_f = Float::with_val(16, 6.5); let large_r = large_f.to_rational().unwrap(); let small_f = Float::with_val(16, -0.125); let small_r = small_f.to_rational().unwrap(); assert_eq!(*large_r.numer(), 13); assert_eq!(*large_r.denom(), 2); assert_eq!(*small_r.numer(), -1); assert_eq!(*small_r.denom(), 8);
fn to_i32_saturating(&self) -> Option<i32>
Converts to an i32
, rounding to the nearest.
If the value is too small or too large for the target type,
the minimum or maximum value allowed is returned.
If the value is a NaN, None
is returned.
fn to_i32_saturating_round(&self, round: Round) -> Option<i32>
Converts to an i32
, applying the specified rounding method.
If the value is too small or too large for the target type,
the minimum or maximum value allowed is returned.
If the value is a NaN, None
is returned.
fn to_u32_saturating(&self) -> Option<u32>
Converts to a u32
, rounding to the nearest.
If the value is too small or too large for the target type,
the minimum or maximum value allowed is returned.
If the value is a NaN, None
is returned.
fn to_u32_saturating_round(&self, round: Round) -> Option<u32>
Converts to a u32
, applying the specified rounding method.
If the value is too small or too large for the target type,
the minimum or maximum value allowed is returned.
If the value is a NaN, None
is returned.
fn to_f32(&self) -> f32
Converts to an f32
, rounding to the nearest.
If the value is too small or too large for the target type, the minimum or maximum value allowed is returned.
fn to_f32_round(&self, round: Round) -> f32
Converts to an f32
, applying the specified rounding method.
If the value is too small or too large for the target type, the minimum or maximum value allowed is returned.
fn to_f64(&self) -> f64
Converts to an f64
, rounding to the nearest.
If the value is too small or too large for the target type, the minimum or maximum value allowed is returned.
fn to_f64_round(&self, round: Round) -> f64
Converts to an f64
, applying the specified rounding method.
If the value is too small or too large for the target type, the minimum or maximum value allowed is returned.
fn to_f32_exp(&self) -> (f32, i32)
Converts to an f32
and an exponent, rounding to the nearest.
The returned f32
is in the range 0.5 ≤ x < 1.
If the value is too small or too large for the target type, the minimum or maximum value allowed is returned.
Examples
use rug::Float; let zero = Float::new(64); let (d0, exp0) = zero.to_f32_exp(); assert_eq!((d0, exp0), (0.0, 0)); let three_eighths = Float::with_val(64, 0.375); let (d3_8, exp3_8) = three_eighths.to_f32_exp(); assert_eq!((d3_8, exp3_8), (0.75, -1));
fn to_f32_exp_round(&self, round: Round) -> (f32, i32)
Converts to an f32
and an exponent, applying the specified
rounding method.
The returned f32
is in the range 0.5 ≤ x < 1.
If the value is too small or too large for the target type, the minimum or maximum value allowed is returned.
Examples
use rug::Float; use rug::float::Round; let frac_10_3 = Float::with_val(64, 10) / 3u32; let (f_down, exp_down) = frac_10_3.to_f32_exp_round(Round::Down); assert_eq!((f_down, exp_down), (0.8333333, 2)); let (f_up, exp_up) = frac_10_3.to_f32_exp_round(Round::Up); assert_eq!((f_up, exp_up), (0.8333334, 2));
fn to_f64_exp(&self) -> (f64, i32)
Converts to an f64
and an exponent, rounding to the nearest.
The returned f64
is in the range 0.5 ≤ x < 1.
If the value is too small or too large for the target type, the minimum or maximum value allowed is returned.
fn to_f64_exp_round(&self, round: Round) -> (f64, i32)
Converts to an f64
and an exponent, applying the specified
rounding method.
The returned f64
is in the range 0.5 ≤ x < 1.
If the value is too small or too large for the target type, the minimum or maximum value allowed is returned.
fn to_string_radix(&self, radix: i32, num_digits: Option<usize>) -> String
Returns a string representation of self
for the specified
radix
rounding to the nearest.
The exponent is encoded in decimal. The output string will have enough precision such that reading it again will give the exact same number.
Examples
use rug::Float; use rug::float::Special; let neg_inf = Float::with_val(53, Special::MinusInfinity); assert_eq!(neg_inf.to_string_radix(10, None), "-inf"); assert_eq!(neg_inf.to_string_radix(16, None), "-@inf@"); let twentythree = Float::with_val(8, 23); assert_eq!(twentythree.to_string_radix(10, None), "2.300e1"); assert_eq!(twentythree.to_string_radix(16, None), "1.70@1"); assert_eq!(twentythree.to_string_radix(10, Some(2)), "2.3e1"); assert_eq!(twentythree.to_string_radix(16, Some(4)), "1.700@1");
Panics
Panics if radix
is less than 2 or greater than 36.
fn to_string_radix_round(
&self,
radix: i32,
num_digits: Option<usize>,
round: Round
) -> String
&self,
radix: i32,
num_digits: Option<usize>,
round: Round
) -> String
Returns a string representation of self
for the specified
radix
applying the specified rounding method.
The exponent is encoded in decimal. The output string will have enough precision such that reading it again will give the exact same number.
Panics
Panics if radix
is less than 2 or greater than 36.
fn assign_str(&mut self, src: &str) -> Result<(), ParseFloatError>
Parses a Float
from a string, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::new(53); f.assign_str("12.5e2").unwrap(); assert_eq!(f, 12.5e2); let ret = f.assign_str("bad"); assert!(ret.is_err());
fn assign_str_round(
&mut self,
src: &str,
round: Round
) -> Result<Ordering, ParseFloatError>
&mut self,
src: &str,
round: Round
) -> Result<Ordering, ParseFloatError>
Parses a Float
from a string, applying the specified
rounding.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; let mut f = Float::new(4); let dir = f.assign_str_round("14.1", Round::Down).unwrap(); assert_eq!(f, 14); assert_eq!(dir, Ordering::Less);
fn assign_str_radix(
&mut self,
src: &str,
radix: i32
) -> Result<(), ParseFloatError>
&mut self,
src: &str,
radix: i32
) -> Result<(), ParseFloatError>
Parses a Float
from a string with the specified radix,
rounding to the nearest.
Examples
use rug::Float; let mut f = Float::new(53); f.assign_str_radix("f.f", 16).unwrap(); assert_eq!(f, 15.9375);
Panics
Panics if radix
is less than 2 or greater than 36.
fn assign_str_radix_round(
&mut self,
src: &str,
radix: i32,
round: Round
) -> Result<Ordering, ParseFloatError>
&mut self,
src: &str,
radix: i32,
round: Round
) -> Result<Ordering, ParseFloatError>
Parses a Float
from a string with the specified radix,
applying the specified rounding.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; let mut f = Float::new(4); let dir = f.assign_str_radix_round("e.c", 16, Round::Up).unwrap(); assert_eq!(f, 15); assert_eq!(dir, Ordering::Greater);
Panics
Panics if radix
is less than 2 or greater than 36.
fn is_integer(&self) -> bool
Returns true
if self
is an integer.
fn is_nan(&self) -> bool
Returns true
if self
is not a number.
fn is_infinite(&self) -> bool
Returns true
if self
is plus or minus infinity.
fn is_finite(&self) -> bool
Returns true
if self
is a finite number,
that is neither NaN nor infinity.
fn is_zero(&self) -> bool
Returns true
if self
is plus or minus zero.
fn is_normal(&self) -> bool
Returns true
if self
is a normal number, that is neither
NaN, nor infinity, nor zero. Note that Float
cannot be
subnormal.
fn sign(&self) -> Option<Ordering>
Returns Ordering::Less
if self
is less than zero,
Ordering::Greater
if self
is greater than zero, or
Ordering::Equal
if self
is equal to zero.
fn cmp_abs(&self, other: &Float) -> Option<Ordering>
Compares the absolute values of self
and other
.
fn get_exp(&self) -> Option<i32>
Returns the exponent of self
if self
is a normal number,
otherwise None
. The significand is assumed to be in the
range [0.5,1).
fn get_sign(&self) -> bool
Returns the sign bit, that is true
if the number is negative.
fn subnormalize(&mut self) -> &mut Float
Emulate subnormal numbers, rounding to the nearest. This method has no effect if the value is not in the subnormal range.
fn subnormalize_round(
&mut self,
prev_rounding: Ordering,
round: Round
) -> Ordering
&mut self,
prev_rounding: Ordering,
round: Round
) -> Ordering
Emulate subnormal numbers, applying the specified rounding
method. This method simply propagates prev_rounding
if the
value is not in the subnormal range.
fn square(self) -> Float
Computes the square, rounding to the nearest.
fn square_mut(&mut self)
Computes the square, rounding to the nearest.
fn square_round(&mut self, round: Round) -> Ordering
Computes the square, applying the specified rounding method.
fn square_ref(&self) -> SquareRef
Compuets the square.
fn sqrt(self) -> Float
Computes the square root, rounding to the nearest.
fn sqrt_mut(&mut self)
Computes the square root, rounding to the nearest.
fn sqrt_round(&mut self, round: Round) -> Ordering
Computes the square root, applying the specified rounding method.
fn sqrt_ref(&self) -> SqrtRef
Computes the square root.
fn assign_sqrt_u(&mut self, u: u32)
Sets self
to the square root of u
, rounding to the
nearest.
fn assign_sqrt_u_round(&mut self, u: u32, round: Round) -> Ordering
Sets self
to the square root of u
, applying the specified
rounding method.
fn recip_sqrt(self) -> Float
Computes the reciprocal square root, rounding to the nearest.
fn recip_sqrt_mut(&mut self)
Computes the reciprocal square root, rounding to the nearest.
fn recip_sqrt_round(&mut self, round: Round) -> Ordering
Computes the reciprocal square root, applying the specified rounding method.
fn recip_sqrt_ref(&self) -> RecipSqrtRef
Computes the reciprocal square root.
fn cbrt(self) -> Float
Computes the cube root, rounding to the nearest.
fn cbrt_mut(&mut self)
Computes the cube root, rounding to the nearest.
fn cbrt_round(&mut self, round: Round) -> Ordering
Computes the cube root, applying the specified rounding method.
fn cbrt_ref(&self) -> CbrtRef
Computes the cube root.
fn root(self, k: u32) -> Float
Computes the kth root, rounding to the nearest.
fn root_mut(&mut self, k: u32)
Computes the kth root, rounding to the nearest.
fn root_round(&mut self, k: u32, round: Round) -> Ordering
Computes the kth root, applying the specified rounding method.
fn root_ref(&self, k: u32) -> RootRef
Computes the kth root.
fn abs(self) -> Float
Computes the absolute value.
fn abs_mut(&mut self)
Computes the absolute value.
fn abs_ref(&self) -> AbsRef
Computes the absolute value.
fn recip(self) -> Float
Computes the reciprocal, rounding to the nearest.
fn recip_mut(&mut self)
Computes the reciprocal, rounding to the nearest.
fn recip_round(&mut self, round: Round) -> Ordering
Computes the reciprocal, applying the specified rounding method.
fn recip_ref(&self) -> RecipRef
Computes the reciprocal.
fn abs_diff(self, other: &Float) -> Float
Computes the positive difference between self
and
other
, rounding to the nearest.
fn abs_diff_mut(&mut self, other: &Float)
Computes the positive difference between self
and
other
, rounding to the nearest.
fn abs_diff_round(&mut self, other: &Float, round: Round) -> Ordering
Computes the positive difference between self
and
other
, applying the specified rounding method.
fn abs_diff_ref<'a>(&'a self, other: &'a Float) -> AbsDiffRef<'a>
Computes the positive difference.
fn ln(self) -> Float
Computes the natural logarithm, rounding to the nearest.
fn ln_mut(&mut self)
Computes the natural logarithm, rounding to the nearest.
fn ln_round(&mut self, round: Round) -> Ordering
Computes the natural logarithm, applying the specified rounding method.
fn ln_ref(&self) -> LnRef
Computes the natural logarithm.
fn log2(self) -> Float
Computes the logarithm to base 2, rounding to the nearest.
fn log2_mut(&mut self)
Computes the logarithm to base 2, rounding to the nearest.
fn log2_round(&mut self, round: Round) -> Ordering
Computes the logarithm to base 2, applying the specified rounding method.
fn log2_ref(&self) -> Log2Ref
Computes the logarithm to base 2.
fn log10(self) -> Float
Computes the logarithm to base 10, rounding to the nearest.
fn log10_mut(&mut self)
Computes the logarithm to base 10, rounding to the nearest.
fn log10_round(&mut self, round: Round) -> Ordering
Computes the logarithm to base 10, applying the specified rounding method.
fn log10_ref(&self) -> Log10Ref
Computes the logarithm to base 10.
fn exp(self) -> Float
Computes the exponential, rounding to the nearest.
fn exp_mut(&mut self)
Computes the exponential, rounding to the nearest.
fn exp_round(&mut self, round: Round) -> Ordering
Computes the exponential, applying the specified rounding method.
fn exp_ref(&self) -> ExpRef
Computes the exponential.
fn exp2(self) -> Float
Computes 2 to the power of self
, rounding to the nearest.
fn exp2_mut(&mut self)
Computes 2 to the power of self
, rounding to the nearest.
fn exp2_round(&mut self, round: Round) -> Ordering
Computes 2 to the power of self
, applying the specified
rounding method.
fn exp2_ref(&self) -> Exp2Ref
Computes 2 to the power of the value.
fn exp10(self) -> Float
Computes 10 to the power of self
, rounding to the nearest.
fn exp10_mut(&mut self)
Computes 10 to the power of self
, rounding to the nearest.
fn exp10_round(&mut self, round: Round) -> Ordering
Computes 10 to the power of self
, applying the specified
rounding method.
fn exp10_ref(&self) -> Exp10Ref
Computes 10 to the power of the value.
fn sin(self) -> Float
Computes the sine, rounding to the nearest.
fn sin_mut(&mut self)
Computes the sine, rounding to the nearest.
fn sin_round(&mut self, round: Round) -> Ordering
Computes the sine, applying the specified rounding method.
fn sin_ref(&self) -> SinRef
Computes the sine.
fn cos(self) -> Float
Computes the cosine, rounding to the nearest.
fn cos_mut(&mut self)
Computes the cosine, rounding to the nearest.
fn cos_round(&mut self, round: Round) -> Ordering
Computes the cosine, applying the specified rounding method.
fn cos_ref(&self) -> CosRef
Computes the cosine.
fn tan(self) -> Float
Computes the tangent, rounding to the nearest.
fn tan_mut(&mut self)
Computes the tangent, rounding to the nearest.
fn tan_round(&mut self, round: Round) -> Ordering
Computes the tangent, applying the specified rounding method.
fn tan_ref(&self) -> TanRef
Computes the tangent.
fn sin_cos(self, cos: Float) -> (Float, Float)
Computes the sine and cosine of self
, rounding to the
nearest.
The sine is stored in self
and keeps its precision,
while the cosine is stored in cos
keeping its precision.
fn sin_cos_round(&mut self, cos: &mut Float)
Computes the sine and cosine of self
, applying the specified
rounding method.
The sine is stored in self
and keeps its precision,
while the cosine is stored in cos
keeping its precision.
fn sin_cos_mut(&mut self, cos: &mut Float, round: Round) -> (Ordering, Ordering)
Computes the sine and cosine of self
, rounding to the
nearest.
The sine is stored in self
and keeps its precision,
while the cosine is stored in cos
keeping its precision.
fn sin_cos_ref(&self) -> SinCosRef
Computes the sine and cosine.
Examples
use rug::{Assign, Float}; // sin(0.5) = 0.47943, cos(0.5) = 0.87758 let angle = Float::with_val(53, 0.5); let r = angle.sin_cos_ref(); // use only 10 bits of precision here to // make comparison easier let (mut sin, mut cos) = (Float::new(10), Float::new(10)); (&mut sin, &mut cos).assign(r); assert_eq!(sin, Float::with_val(10, 0.47943)); assert_eq!(cos, Float::with_val(10, 0.87748));
fn sec(self) -> Float
Computes the secant, rounding to the nearest.
fn sec_mut(&mut self)
Computes the secant, rounding to the nearest.
fn sec_round(&mut self, round: Round) -> Ordering
Computes the secant, applying the specified rounding method.
fn sec_ref(&self) -> SecRef
Computes the secant.
fn csc(self) -> Float
Computes the cosecant, rounding to the nearest.
fn csc_mut(&mut self)
Computes the cosecant, rounding to the nearest.
fn csc_round(&mut self, round: Round) -> Ordering
Computes the cosecant, applying the specified rounding method.
fn csc_ref(&self) -> CscRef
Computes the cosecant.
fn cot(self) -> Float
Computes the cotangent, rounding to the nearest.
fn cot_mut(&mut self)
Computes the cotangent, rounding to the nearest.
fn cot_round(&mut self, round: Round) -> Ordering
Computes the cotangent, applying the specified rounding method.
fn cot_ref(&self) -> CotRef
Computes the cotangent.
fn acos(self) -> Float
Computes the arc-cosine, rounding to the nearest.
fn acos_mut(&mut self)
Computes the arc-cosine, rounding to the nearest.
fn acos_round(&mut self, round: Round) -> Ordering
Computes the arc-cosine, applying the specified rounding method.
fn acos_ref(&self) -> AcosRef
Computes the arc-cosine.
fn asin(self) -> Float
Computes the arc-sine, rounding to the nearest.
fn asin_mut(&mut self)
Computes the arc-sine, rounding to the nearest.
fn asin_round(&mut self, round: Round) -> Ordering
Computes the arc-sine, applying the specified rounding method.
fn asin_ref(&self) -> AsinRef
Computes the arc-sine.
fn atan(self) -> Float
Computes the arc-tangent, rounding to the nearest.
fn atan_mut(&mut self)
Computes the arc-tangent, rounding to the nearest.
fn atan_round(&mut self, round: Round) -> Ordering
Computes the arc-tangent, applying the specified rounding method.
fn atan_ref(&self) -> AtanRef
Computes the arc-tangent.
fn atan2(self, other: &Float) -> Float
Computes the arc-tangent2 of self
and other
, rounding to
the nearest.
This is similar to the arc-tangent of self / other
, except
in the cases when either self
or other
or both are zero or
infinity.
fn atan2_mut(&mut self, other: &Float)
Computes the arc-tangent2 of self
and other
, rounding to
the nearest.
This is similar to the arc-tangent of self / other
, except
in the cases when either self
or other
or both are zero or
infinity.
fn atan2_round(&mut self, other: &Float, round: Round) -> Ordering
Computes the arc-tangent2 of self
and other
, applying the
specified rounding method.
This is similar to the arc-tangent of self / other
, except
in the cases when either self
or other
or both are zero or
infinity.
fn atan2_ref<'a>(&'a self, other: &'a Float) -> Atan2Ref<'a>
Computes the arc-tangent.
fn sinh(self) -> Float
Computes the hyperbolic sine, rounding to the nearest.
fn sinh_mut(&mut self)
Computes the hyperbolic sine, rounding to the nearest.
fn sinh_round(&mut self, round: Round) -> Ordering
Computes the hyperbolic sine, applying the specified rounding method.
fn sinh_ref(&self) -> SinhRef
Computes the hyperbolic sine.
fn cosh(self) -> Float
Computes the hyperbolic cosine, rounding to the nearest.
fn cosh_mut(&mut self)
Computes the hyperbolic cosine, rounding to the nearest.
fn cosh_round(&mut self, round: Round) -> Ordering
Computes the hyperbolic cosine, applying the specified rounding method.
fn cosh_ref(&self) -> CoshRef
Computes the hyperbolic cosine.
fn tanh(self) -> Float
Computes the hyperbolic tangent, rounding to the nearest.
fn tanh_mut(&mut self)
Computes the hyperbolic tangent, rounding to the nearest.
fn tanh_round(&mut self, round: Round) -> Ordering
Computes the hyperbolic tangent, applying the specified rounding method.
fn tanh_ref(&self) -> TanhRef
Computes the hyperbolic tangent.
fn sinh_cosh(self, cos: Float) -> (Float, Float)
Computes the hyperbolic sine and cosine of self
,
rounding to the nearest.
The sine is stored in self
and keeps its precision,
while the cosine is stored in cos
keeping its precision.
fn sinh_cosh_round(&mut self, cos: &mut Float)
Computes the hyperbolic sine and cosine of self
,
applying the specified rounding method.
The sine is stored in self
and keeps its precision,
while the cosine is stored in cos
keeping its precision.
fn sinh_cosh_mut(
&mut self,
cos: &mut Float,
round: Round
) -> (Ordering, Ordering)
&mut self,
cos: &mut Float,
round: Round
) -> (Ordering, Ordering)
Computes the hyperbolic sine and cosine of self
,
rounding to the nearest.
The sine is stored in self
and keeps its precision,
while the cosine is stored in cos
keeping its precision.
fn sinh_cosh_ref(&self) -> SinhCoshRef
Computes the hyperbolic sine and cosine.
Examples
use rug::{Assign, Float}; // sinh(0.5) = 0.52110, cosh(0.5) = 1.1276 let angle = Float::with_val(53, 0.5); let r = angle.sinh_cosh_ref(); // use only 10 bits of precision here to // make comparison easier let (mut sinh, mut cosh) = (Float::new(10), Float::new(10)); (&mut sinh, &mut cosh).assign(r); assert_eq!(sinh, Float::with_val(10, 0.52110)); assert_eq!(cosh, Float::with_val(10, 1.1276));
fn sech(self) -> Float
Computes the hyperbolic secant, rounding to the nearest.
fn sech_mut(&mut self)
Computes the hyperbolic secant, rounding to the nearest.
fn sech_round(&mut self, round: Round) -> Ordering
Computes the hyperbolic secant, applying the specified rounding method.
fn sech_ref(&self) -> SechRef
Computes the hyperbolic secant.
fn csch(self) -> Float
Computes the hyperbolic cosecant, rounding to the nearest.
fn csch_mut(&mut self)
Computes the hyperbolic cosecant, rounding to the nearest.
fn csch_round(&mut self, round: Round) -> Ordering
Computes the hyperbolic cosecant, applying the specified rounding method.
fn csch_ref(&self) -> CschRef
Computes the hyperbolic cosecant.
fn coth(self) -> Float
Computes the hyperbolic cotangent, rounding to the nearest.
fn coth_mut(&mut self)
Computes the hyperbolic cotangent, rounding to the nearest.
fn coth_round(&mut self, round: Round) -> Ordering
Computes the hyperbolic cotangent, applying the specified rounding method.
fn coth_ref(&self) -> CothRef
Computes the hyperbolic cotangent.
fn acosh(self) -> Float
Computes the inverse hyperbolic cosine, rounding to the nearest.
fn acosh_mut(&mut self)
Computes the inverse hyperbolic cosine, rounding to the nearest.
fn acosh_round(&mut self, round: Round) -> Ordering
Computes the inverse hyperbolic cosine, applying the specified rounding method.
fn acosh_ref(&self) -> AcoshRef
Computes the inverse hyperbolic cosine
fn asinh(self) -> Float
Computes the inverse hyperbolic sine, rounding to the nearest.
fn asinh_mut(&mut self)
Computes the inverse hyperbolic sine, rounding to the nearest.
fn asinh_round(&mut self, round: Round) -> Ordering
Computes the inverse hyperbolic sine, applying the specified rounding method.
fn asinh_ref(&self) -> AsinhRef
Computes the inverse hyperbolic sine.
fn atanh(self) -> Float
Computes the inverse hyperbolic tangent, rounding to the nearest.
fn atanh_mut(&mut self)
Computes the inverse hyperbolic tangent, rounding to the nearest.
fn atanh_round(&mut self, round: Round) -> Ordering
Computes the inverse hyperbolic tangent, applying the specified rounding method.
fn atanh_ref(&self) -> AtanhRef
Computes the inverse hyperbolic tangent.
fn assign_factorial_u(&mut self, u: u32)
Sets self
to the factorial of u, rounding to the nearest.
fn assign_factorial_u_round(&mut self, u: u32, round: Round) -> Ordering
Sets self
to the factorial of u, applying the specified
rounding method.
fn ln_1p(self) -> Float
Computes the natural logarithm of one plus self
, rounding to
the nearest.
fn ln_1p_mut(&mut self)
Computes the natural logarithm of one plus self
, rounding to
the nearest.
fn ln_1p_round(&mut self, round: Round) -> Ordering
Computes the natural logarithm of one plus self
, applying
the specified rounding method.
fn ln_1p_ref(&self) -> Ln1pRef
Computes the natural logorithm of one plus the value.
fn exp_m1(self) -> Float
Subtracts one from the exponential of self
, rounding to the
nearest.
fn exp_m1_mut(&mut self)
Subtracts one from the exponential of self
, rounding to the
nearest.
fn exp_m1_round(&mut self, round: Round) -> Ordering
Subtracts one from the exponential of self
, applying the
specified rounding method.
fn exp_m1_ref(&self) -> ExpM1Ref
Computes one less than the exponential of the value.
fn eint(self) -> Float
Computes the exponential integral, rounding to the nearest.
fn eint_mut(&mut self)
Computes the exponential integral, rounding to the nearest.
fn eint_round(&mut self, round: Round) -> Ordering
Computes the exponential integral, applying the specified rounding method.
fn eint_ref(&self) -> EintRef
Computes the exponential integral.
fn li2(self) -> Float
Computes the real part of the dilogarithm of self
, rounding
to the nearest.
fn li2_mut(&mut self)
Computes the real part of the dilogarithm of self
, rounding
to the nearest.
fn li2_round(&mut self, round: Round) -> Ordering
Computes the real part of the dilogarithm of self
, applying
the specified rounding method.
fn li2_ref(&self) -> Li2Ref
Computes the real part of the dilogarithm of the value.
fn gamma(self) -> Float
Computes the value of the Gamma function on self
, rounding
to the nearest.
fn gamma_mut(&mut self)
Computes the value of the Gamma function on self
, rounding
to the nearest.
fn gamma_round(&mut self, round: Round) -> Ordering
Computes the value of the Gamma function on self
, applying
the specified rounding method.
fn gamma_ref(&self) -> GammaRef
Computes the Gamma function on the value.
fn ln_gamma(self) -> Float
Computes the logarithm of the Gamma function on self
,
rounding to the nearest.
fn ln_gamma_mut(&mut self)
Computes the logarithm of the Gamma function on self
,
rounding to the nearest.
fn ln_gamma_round(&mut self, round: Round) -> Ordering
Computes the logarithm of the Gamma function on self
,
applying the specified rounding method.
fn ln_gamma_ref(&self) -> LnGammaRef
Computes the logarithm of the Gamma function on the value.
fn ln_abs_gamma(self) -> (Float, Ordering)
Computes the logarithm of the absolute value of the Gamma
function on self
, rounding to the nearest.
Returns Ordering::Less
if the Gamma function is negative, or
Ordering::Greater
if the Gamma function is positive.
Examples
use rug::Float; use rug::float::Constant; use std::cmp::Ordering; // gamma of 1/2 is sqrt(pi) let ln_gamma_64 = Float::with_val(64, Constant::Pi).sqrt().ln(); let f = Float::with_val(53, 0.5); let (ln_gamma, sign) = f.ln_abs_gamma(); // gamma of 1/2 is positive assert_eq!(sign, Ordering::Greater); // check to 53 significant bits assert_eq!(ln_gamma, Float::with_val(53, &ln_gamma_64));
If the Gamma function is negative, the sign returned is
Ordering::Less
.
use rug::Float; use rug::float::Constant; use std::cmp::Ordering; // gamma of -1/2 is -2 * sqrt(pi) let abs_gamma_64 = Float::with_val(64, Constant::Pi).sqrt() * 2u32; let ln_gamma_64 = abs_gamma_64.ln(); let f = Float::with_val(53, -0.5); let (ln_gamma, sign) = f.ln_abs_gamma(); // gamma of -1/2 is negative assert_eq!(sign, Ordering::Less); // check to 53 significant bits assert_eq!(ln_gamma, Float::with_val(53, &ln_gamma_64));
fn ln_abs_gamma_mut(&mut self) -> Ordering
Computes the logarithm of the absolute value of the Gamma
function on self
, rounding to the nearest.
Returns Ordering::Less
if the Gamma function is negative, or
Ordering::Greater
if the Gamma function is positive.
Examples
use rug::Float; use rug::float::Constant; use std::cmp::Ordering; // gamma of -1/2 is -2 * sqrt(pi) let abs_gamma_64 = Float::with_val(64, Constant::Pi).sqrt() * 2u32; let ln_gamma_64 = abs_gamma_64.ln(); let mut f = Float::with_val(53, -0.5); let sign = f.ln_abs_gamma_mut(); // gamma of -1/2 is negative assert_eq!(sign, Ordering::Less); // check to 53 significant bits assert_eq!(f, Float::with_val(53, &ln_gamma_64));
fn ln_abs_gamma_round(&mut self, round: Round) -> (Ordering, Ordering)
Computes the logarithm of the absolute value of the Gamma
function on self
, applying the specified rounding method.
The returned tuple contains:
- The logarithm of the absolute value of the Gamma function.
- The rounding direction.
Examples
use rug::Float; use rug::float::{Constant, Round}; use std::cmp::Ordering; // gamma of -1/2 is -2 * sqrt(pi) let abs_gamma_64 = Float::with_val(64, Constant::Pi).sqrt() * 2u32; let ln_gamma_64 = abs_gamma_64.ln(); let mut f = Float::with_val(53, -0.5); let (sign, dir) = f.ln_abs_gamma_round(Round::Nearest); // gamma of -1/2 is negative assert_eq!(sign, Ordering::Less); // check is correct to 53 significant bits let (check, check_dir) = Float::with_val_round(53, &ln_gamma_64, Round::Nearest); assert_eq!(f, check); assert_eq!(dir, check_dir);
fn ln_abs_gamma_ref(&self) -> LnAbsGammaRef
Computes the logarithm of the absolute value of the Gamma
function on val
.
Examples
use rug::{Assign, Float}; use rug::float::Constant; use std::cmp::Ordering; let neg1_2 = Float::with_val(53, -0.5); // gamma of -1/2 is -2 * sqrt(pi) let abs_gamma_64 = Float::with_val(64, Constant::Pi).sqrt() * 2u32; let ln_gamma_64 = abs_gamma_64.ln(); // Assign rounds to the nearest let r = neg1_2.ln_abs_gamma_ref(); let (mut f, mut sign) = (Float::new(53), Ordering::Equal); (&mut f, &mut sign).assign(r); // gamma of -1/2 is negative assert_eq!(sign, Ordering::Less); // check to 53 significant bits assert_eq!(f, Float::with_val(53, &ln_gamma_64));
fn digamma(self) -> Float
Computes the value of the Digamma function on self
, rounding
to the nearest.
fn digamma_mut(&mut self)
Computes the value of the Digamma function on self
, rounding
to the nearest.
fn digamma_round(&mut self, round: Round) -> Ordering
Computes the value of the Digamma function on self
, applying
the specified rounding method.
fn digamma_ref(&self) -> DigammaRef
Computes the Digamma function on the value.
fn zeta(self) -> Float
Computes the value of the Riemann Zeta function on self
,
rounding to the nearest.
fn zeta_mut(&mut self)
Computes the value of the Riemann Zeta function on self
,
rounding to the nearest.
fn zeta_round(&mut self, round: Round) -> Ordering
Computes the value of the Riemann Zeta function on self
,
applying the specified rounding method.
fn zeta_ref(&self) -> ZetaRef
Computes the Riemann Zeta function on the value.
fn assign_zeta_u(&mut self, u: u32)
Sets self
to the value of the Riemann Zeta function on u,
rounding to the nearest.
fn assign_zeta_u_round(&mut self, u: u32, round: Round) -> Ordering
Sets self
to the value of the Riemann Zeta function on u,
applying the specified rounding method.
fn erf(self) -> Float
Computes the value of the error function, rounding to the nearest.
fn erf_mut(&mut self)
Computes the value of the error function, rounding to the nearest.
fn erf_round(&mut self, round: Round) -> Ordering
Computes the value of the error function, applying the specified rounding method.
fn erf_ref(&self) -> ErfRef
Computes the error function.
fn erfc(self) -> Float
Computes the value of the complementary error function, rounding to the nearest.
fn erfc_mut(&mut self)
Computes the value of the complementary error function, rounding to the nearest.
fn erfc_round(&mut self, round: Round) -> Ordering
Computes the value of the complementary error function, applying the specified rounding method.
fn erfc_ref(&self) -> ErfcRef
Computes the complementary error function.
fn j0(self) -> Float
Computes the value of the first kind Bessel function of order 0, rounding to the nearest.
fn j0_mut(&mut self)
Computes the value of the first kind Bessel function of order 0, rounding to the nearest.
fn j0_round(&mut self, round: Round) -> Ordering
Computes the value of the first kind Bessel function of order 0, applying the specified rounding method.
fn j0_ref(&self) -> J0Ref
Computes the first kind Bessel function of order 0.
fn j1(self) -> Float
Computes the value of the first kind Bessel function of order 1, rounding to the nearest.
fn j1_mut(&mut self)
Computes the value of the first kind Bessel function of order 1, rounding to the nearest.
fn j1_round(&mut self, round: Round) -> Ordering
Computes the value of the first kind Bessel function of order 1, applying the specified rounding method.
fn j1_ref(&self) -> J1Ref
Computes the first kind Bessel function of order 1.
fn jn(self, n: i32) -> Float
Computes the value of the first kind Bessel function of order n, rounding to the nearest.
fn jn_mut(&mut self, n: i32)
Computes the value of the first kind Bessel function of order n, rounding to the nearest.
fn jn_round(&mut self, n: i32, round: Round) -> Ordering
Computes the value of the first kind Bessel function of order n, applying the specified rounding method.
fn jn_ref(&self, n: i32) -> JnRef
Computes the first kind Bessel function of order n.
fn y0(self) -> Float
Computes the value of the second kind Bessel function of order 0, rounding to the nearest.
fn y0_mut(&mut self)
Computes the value of the second kind Bessel function of order 0, rounding to the nearest.
fn y0_round(&mut self, round: Round) -> Ordering
Computes the value of the second kind Bessel function of order 0, applying the specified rounding method.
fn y0_ref(&self) -> Y0Ref
Computes the second kind Bessel function of order 0.
fn y1(self) -> Float
Computes the value of the second kind Bessel function of order 1, rounding to the nearest.
fn y1_mut(&mut self)
Computes the value of the second kind Bessel function of order 1, rounding to the nearest.
fn y1_round(&mut self, round: Round) -> Ordering
Computes the value of the second kind Bessel function of order 1, applying the specified rounding method.
fn y1_ref(&self) -> Y1Ref
Computes the second kind Bessel function of order 1.
fn yn(self, n: i32) -> Float
Computes the value of the second kind Bessel function of order n, rounding to the nearest.
fn yn_mut(&mut self, n: i32)
Computes the value of the second kind Bessel function of order n, rounding to the nearest.
fn yn_round(&mut self, n: i32, round: Round) -> Ordering
Computes the value of the second kind Bessel function of order n, applying the specified rounding method.
fn yn_ref(&self, n: i32) -> YnRef
Computes the second kind Bessel function of order n.
fn agm(self, other: &Float) -> Float
Computes the arithmetic-geometric mean of self
and other
,
rounding to the nearest.
fn agm_mut(&mut self, other: &Float)
Computes the arithmetic-geometric mean of self
and other
,
rounding to the nearest.
fn agm_round(&mut self, other: &Float, round: Round) -> Ordering
Computes the arithmetic-geometric mean of self
and other
,
applying the specified rounding method.
fn agm_ref<'a>(&'a self, other: &'a Float) -> AgmRef<'a>
Computes the arithmetic-geometric mean.
fn hypot(self, other: &Float) -> Float
Computes the Euclidean norm of self
and other
, rounding to
the nearest.
fn hypot_mut(&mut self, other: &Float)
Computes the Euclidean norm of self
and other
, rounding to
the nearest.
fn hypot_round(&mut self, other: &Float, round: Round) -> Ordering
Computes the Euclidean norm of self
and other
, applying
the specified rounding method.
fn hypot_ref<'a>(&'a self, other: &'a Float) -> HypotRef<'a>
Computes the Euclidean norm.
fn ai(self) -> Float
Computes the value of the Airy function Ai on self
, rounding
to the nearest.
fn ai_mut(&mut self)
Computes the value of the Airy function Ai on self
, rounding
to the nearest.
fn ai_round(&mut self, round: Round) -> Ordering
Computes the value of the Airy function Ai on self
, applying
the specified rounding method.
fn ai_ref(&self) -> AiRef
Computes the Airy function Ai on the value.
fn ceil(self) -> Float
Rounds up to the next higher integer.
fn ceil_mut(&mut self)
Rounds up to the next higher integer.
fn ceil_ref(&self) -> CeilRef
Rounds up to the next higher integer. The result may be rounded again when assigned to the target.
fn floor(self) -> Float
Rounds down to the next lower integer.
fn floor_mut(&mut self)
Rounds down to the next lower integer.
fn floor_ref(&self) -> FloorRef
Rounds down to the next lower integer. The result may be rounded again when assigned to the target.
fn round(self) -> Float
Rounds to the nearest integer, rounding half-way cases away from zero.
fn round_mut(&mut self)
Rounds to the nearest integer, rounding half-way cases away from zero.
fn round_ref(&self) -> RoundRef
Rounds to the nearest integer, rounding half-way cases away from zero. The result may be rounded again when assigned to the target.
Examples
use rug::{AssignRound, Float}; use rug::float::Round; let f = Float::with_val(53, 6.5); // 6.5 (binary 110.1) is rounded to 7 (binary 111) let r = f.round_ref(); // use only 2 bits of precision in destination let mut dst = Float::new(2); // 7 (binary 111) is rounded to 8 (binary 1000) by // round-even rule in order to store in 2-bit Float, even // though 6 (binary 110) is closer to original 6.5). dst.assign_round(r, Round::Nearest); assert_eq!(dst, 8);
fn trunc(self) -> Float
Rounds to the next integer towards zero.
fn trunc_mut(&mut self)
Rounds to the next integer towards zero.
fn trunc_ref(&self) -> TruncRef
Rounds to the next integer towards zero. The result may be rounded again when assigned to the target.
fn fract(self) -> Float
Gets the fractional part of the number.
fn fract_mut(&mut self)
Gets the fractional part of the number.
fn fract_ref(&self) -> FractRef
Gets the fractional part of the number.
fn trunc_fract(self, fract: Float) -> (Float, Float)
Gets the integer and fractional parts of the number, rounding to the nearest.
The integer part is stored in self
and keeps its
precision, while the fractional part is stored in fract
keeping its precision.
fn trunc_fract_round(&mut self, fract: &mut Float)
Gets the integer and fractional parts of the number, applying the specified rounding method.
The integer part is stored in self
and keeps its
precision, while the fractional part is stored in fract
keeping its precision.
fn trunc_fract_mut(
&mut self,
fract: &mut Float,
round: Round
) -> (Ordering, Ordering)
&mut self,
fract: &mut Float,
round: Round
) -> (Ordering, Ordering)
Gets the integer and fractional parts of the number, rounding to the nearest.
The integer part is stored in self
and keeps its
precision, while the fractional part is stored in fract
keeping its precision.
fn trunc_fract_ref(&self) -> TruncFractRef
Gets the integer and fractional parts of the number.
fn assign_random_bits(&mut self, rng: &mut RandState) -> Result<(), ()>
Generates a random number in the range 0 ≤ x < 1.
This is equivalent to generating a random integer in the range 0 ≤ x < 2p, where 2p is two raised to the power of the precision, and then dividing the integer by 2p. The smallest non-zero result will thus be 2−p, and will only have one bit set. In the smaller possible results, many bits will be zero, and not all the precision will be used.
Examples
use rug::Float; use rug::rand::RandState; let mut rand = RandState::new(); let mut f = Float::new(2); f.assign_random_bits(&mut rand).unwrap(); assert!(f == 0.0 || f == 0.25 || f == 0.5 || f == 0.75); println!("0.0 <= {} < 1.0", f);
Errors
In all the normal cases, the result will be exact. However, if
the precision is very large, and the generated random number
is very small, this may require an exponent smaller than
float::exp_min()
; in this case, the
number is set to Nan and an error is returned. This would most
likely be a programming error.
fn assign_random_cont(&mut self, rng: &mut RandState)
Generates a random number in the continuous range 0 ≤ x < 1, and rounds to the nearest.
The rounded result can actually be equal to one.
This is equivalent to calling
assign_random_cont_round(rng, Round::Nearest)
.
fn assign_random_cont_round(
&mut self,
rng: &mut RandState,
round: Round
) -> Ordering
&mut self,
rng: &mut RandState,
round: Round
) -> Ordering
Generates a random number in the continous range 0 ≤ x < 1, and applies the specified rounding method.
The rounded result can actually be equal to one. Unlike
assign_random_bits_round()
which generates a discrete random number at intervals
depending on the precision, this method is equivalent to
generating a continuous random number with infinite precision
and then rounding the result. This means that even the smaller
numbers will be using all the available precision bits, and
rounding is performed in all cases, not in some corner case.
Examples
use rug::Float; use rug::float::Round; use rug::rand::RandState; use std::cmp::Ordering; let mut rand = RandState::new(); let mut f = Float::new(2); let dir = f.assign_random_cont_round(&mut rand, Round::Nearest); // We cannot have an exact value without rounding. assert_ne!(dir, Ordering::Equal); // The significand is either 0b10 or 0b11 // 10 11 assert!(f == 1.0 || f == 0.75 || f == 0.5 || f == 0.375 || f == 0.25 || f <= 0.1875); // If the result is 1.0, rounding was up. assert!(f != 1.0 || dir == Ordering::Greater);
fn assign_random_gaussian(
&mut self,
other: Option<&mut Float>,
rng: &mut RandState
)
&mut self,
other: Option<&mut Float>,
rng: &mut RandState
)
Generates two random numbers according to a standard normal Gaussian distribution, rounding to the nearest.
If other
is None
, only one value is generated.
fn assign_random_gaussian_round(
&mut self,
other: Option<&mut Float>,
rng: &mut RandState,
round: Round
) -> (Ordering, Ordering)
&mut self,
other: Option<&mut Float>,
rng: &mut RandState,
round: Round
) -> (Ordering, Ordering)
Generates two random numbers according to a standard normal Gaussian distribution, applying the specified rounding method.
If other
is None
, only one value is generated.
Trait Implementations
impl Clone for Float
[src]
fn clone(&self) -> Float
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Float)
Performs copy-assignment from source
. Read more
impl Drop for Float
[src]
impl Display for Float
[src]
impl Debug for Float
[src]
impl LowerExp for Float
[src]
impl UpperExp for Float
[src]
impl Binary for Float
[src]
impl Octal for Float
[src]
impl LowerHex for Float
[src]
impl UpperHex for Float
[src]
impl<T> Assign<T> for Float where
Float: AssignRound<T, Round = Round, Ordering = Ordering>,
[src]
Float: AssignRound<T, Round = Round, Ordering = Ordering>,
impl AssignRound<Constant> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, other: Constant, round: Round) -> Ordering
Peforms the assignment. Read more
impl AssignRound<Special> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, other: Special, _round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<&'a Float> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, other: &'a Float, round: Round) -> Ordering
Peforms the assignment. Read more
impl AssignRound<Float> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, other: Float, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<&'a Integer> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, other: &'a Integer, round: Round) -> Ordering
Peforms the assignment. Read more
impl AssignRound<Integer> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, other: Integer, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<&'a Rational> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, other: &'a Rational, round: Round) -> Ordering
Peforms the assignment. Read more
impl AssignRound<Rational> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, other: Rational, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<SquareRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SquareRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<SqrtRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SqrtRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<RecipSqrtRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: RecipSqrtRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<CbrtRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: CbrtRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<RootRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: RootRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<AbsRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AbsRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<RecipRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: RecipRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<AbsDiffRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AbsDiffRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<LnRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: LnRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<Log2Ref<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: Log2Ref<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<Log10Ref<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: Log10Ref<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<ExpRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: ExpRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<Exp2Ref<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: Exp2Ref<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<Exp10Ref<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: Exp10Ref<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<SinRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SinRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<CosRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: CosRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<TanRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: TanRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<SecRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SecRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<CscRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: CscRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<CotRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: CotRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<AcosRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AcosRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<AsinRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AsinRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<AtanRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AtanRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<Atan2Ref<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: Atan2Ref<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<CoshRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: CoshRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<SinhRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SinhRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<TanhRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: TanhRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<SechRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SechRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<CschRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: CschRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<CothRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: CothRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<AcoshRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AcoshRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<AsinhRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AsinhRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<AtanhRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AtanhRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<Ln1pRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: Ln1pRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<ExpM1Ref<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: ExpM1Ref<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<EintRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: EintRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<Li2Ref<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: Li2Ref<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<GammaRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: GammaRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<LnGammaRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: LnGammaRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<DigammaRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: DigammaRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<ZetaRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: ZetaRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<ErfRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: ErfRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<ErfcRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: ErfcRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<J0Ref<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: J0Ref<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<J1Ref<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: J1Ref<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<JnRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: JnRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<Y0Ref<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: Y0Ref<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<Y1Ref<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: Y1Ref<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<YnRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: YnRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<AgmRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AgmRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<HypotRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: HypotRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<AiRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AiRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<CeilRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: CeilRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<FloorRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: FloorRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<RoundRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: RoundRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<TruncRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: TruncRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<FractRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: FractRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl Neg for Float
[src]
type Output = Float
The resulting type after applying the -
operator
fn neg(self) -> Float
The method for the unary -
operator
impl NegAssign for Float
[src]
fn neg_assign(&mut self)
Peforms the negation. Read more
impl<'a> Neg for &'a Float
[src]
type Output = NegRef<'a>
The resulting type after applying the -
operator
fn neg(self) -> NegRef<'a>
The method for the unary -
operator
impl<'a> AssignRound<NegRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: NegRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl Add<Float> for Float
[src]
type Output = Float
The resulting type after applying the +
operator
fn add(self, rhs: Float) -> Float
The method for the +
operator
impl<'a> Add<&'a Float> for Float
[src]
type Output = Float
The resulting type after applying the +
operator
fn add(self, rhs: &'a Float) -> Float
The method for the +
operator
impl AddAssign<Float> for Float
[src]
fn add_assign(&mut self, rhs: Float)
The method for the +=
operator
impl<'a> AddAssign<&'a Float> for Float
[src]
fn add_assign(&mut self, rhs: &'a Float)
The method for the +=
operator
impl AddAssignRound<Float> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn add_assign_round(&mut self, rhs: Float, round: Round) -> Ordering
Performs the addition. Read more
impl<'a> AddAssignRound<&'a Float> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn add_assign_round(&mut self, rhs: &'a Float, round: Round) -> Ordering
Performs the addition. Read more
impl<'a> Add<&'a Float> for &'a Float
[src]
type Output = AddRef<'a>
The resulting type after applying the +
operator
fn add(self, rhs: &'a Float) -> AddRef<'a>
The method for the +
operator
impl<'a> AssignRound<AddRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AddRef, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> Add<Float> for &'a Float
[src]
type Output = Float
The resulting type after applying the +
operator
fn add(self, rhs: Float) -> Float
The method for the +
operator
impl AddFrom<Float> for Float
[src]
impl<'a> AddFrom<&'a Float> for Float
[src]
impl<'a> AddFromRound<Float> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn add_from_round(&mut self, lhs: Float, round: Round) -> Ordering
Performs the addition. Read more
impl<'a> AddFromRound<&'a Float> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn add_from_round(&mut self, lhs: &'a Float, round: Round) -> Ordering
Performs the addition. Read more
impl Sub<Float> for Float
[src]
type Output = Float
The resulting type after applying the -
operator
fn sub(self, rhs: Float) -> Float
The method for the -
operator
impl<'a> Sub<&'a Float> for Float
[src]
type Output = Float
The resulting type after applying the -
operator
fn sub(self, rhs: &'a Float) -> Float
The method for the -
operator
impl SubAssign<Float> for Float
[src]
fn sub_assign(&mut self, rhs: Float)
The method for the -=
operator
impl<'a> SubAssign<&'a Float> for Float
[src]
fn sub_assign(&mut self, rhs: &'a Float)
The method for the -=
operator
impl SubAssignRound<Float> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn sub_assign_round(&mut self, rhs: Float, round: Round) -> Ordering
Performs the subtraction. Read more
impl<'a> SubAssignRound<&'a Float> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn sub_assign_round(&mut self, rhs: &'a Float, round: Round) -> Ordering
Performs the subtraction. Read more
impl<'a> Sub<&'a Float> for &'a Float
[src]
type Output = SubRef<'a>
The resulting type after applying the -
operator
fn sub(self, rhs: &'a Float) -> SubRef<'a>
The method for the -
operator
impl<'a> AssignRound<SubRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SubRef, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> Sub<Float> for &'a Float
[src]
type Output = Float
The resulting type after applying the -
operator
fn sub(self, rhs: Float) -> Float
The method for the -
operator
impl SubFrom<Float> for Float
[src]
impl<'a> SubFrom<&'a Float> for Float
[src]
impl<'a> SubFromRound<Float> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn sub_from_round(&mut self, lhs: Float, round: Round) -> Ordering
Performs the subtraction. Read more
impl<'a> SubFromRound<&'a Float> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn sub_from_round(&mut self, lhs: &'a Float, round: Round) -> Ordering
Performs the subtraction. Read more
impl Mul<Float> for Float
[src]
type Output = Float
The resulting type after applying the *
operator
fn mul(self, rhs: Float) -> Float
The method for the *
operator
impl<'a> Mul<&'a Float> for Float
[src]
type Output = Float
The resulting type after applying the *
operator
fn mul(self, rhs: &'a Float) -> Float
The method for the *
operator
impl MulAssign<Float> for Float
[src]
fn mul_assign(&mut self, rhs: Float)
The method for the *=
operator
impl<'a> MulAssign<&'a Float> for Float
[src]
fn mul_assign(&mut self, rhs: &'a Float)
The method for the *=
operator
impl MulAssignRound<Float> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn mul_assign_round(&mut self, rhs: Float, round: Round) -> Ordering
Performs the multiplication. Read more
impl<'a> MulAssignRound<&'a Float> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn mul_assign_round(&mut self, rhs: &'a Float, round: Round) -> Ordering
Performs the multiplication. Read more
impl<'a> Mul<&'a Float> for &'a Float
[src]
type Output = MulRef<'a>
The resulting type after applying the *
operator
fn mul(self, rhs: &'a Float) -> MulRef<'a>
The method for the *
operator
impl<'a> AssignRound<MulRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: MulRef, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> Mul<Float> for &'a Float
[src]
type Output = Float
The resulting type after applying the *
operator
fn mul(self, rhs: Float) -> Float
The method for the *
operator
impl MulFrom<Float> for Float
[src]
impl<'a> MulFrom<&'a Float> for Float
[src]
impl<'a> MulFromRound<Float> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn mul_from_round(&mut self, lhs: Float, round: Round) -> Ordering
Performs the multiplication. Read more
impl<'a> MulFromRound<&'a Float> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn mul_from_round(&mut self, lhs: &'a Float, round: Round) -> Ordering
Performs the multiplication. Read more
impl Div<Float> for Float
[src]
type Output = Float
The resulting type after applying the /
operator
fn div(self, rhs: Float) -> Float
The method for the /
operator
impl<'a> Div<&'a Float> for Float
[src]
type Output = Float
The resulting type after applying the /
operator
fn div(self, rhs: &'a Float) -> Float
The method for the /
operator
impl DivAssign<Float> for Float
[src]
fn div_assign(&mut self, rhs: Float)
The method for the /=
operator
impl<'a> DivAssign<&'a Float> for Float
[src]
fn div_assign(&mut self, rhs: &'a Float)
The method for the /=
operator
impl DivAssignRound<Float> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn div_assign_round(&mut self, rhs: Float, round: Round) -> Ordering
Performs the division. Read more
impl<'a> DivAssignRound<&'a Float> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn div_assign_round(&mut self, rhs: &'a Float, round: Round) -> Ordering
Performs the division. Read more
impl<'a> Div<&'a Float> for &'a Float
[src]
type Output = DivRef<'a>
The resulting type after applying the /
operator
fn div(self, rhs: &'a Float) -> DivRef<'a>
The method for the /
operator
impl<'a> AssignRound<DivRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: DivRef, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> Div<Float> for &'a Float
[src]
type Output = Float
The resulting type after applying the /
operator
fn div(self, rhs: Float) -> Float
The method for the /
operator
impl DivFrom<Float> for Float
[src]
impl<'a> DivFrom<&'a Float> for Float
[src]
impl<'a> DivFromRound<Float> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn div_from_round(&mut self, lhs: Float, round: Round) -> Ordering
Performs the division. Read more
impl<'a> DivFromRound<&'a Float> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn div_from_round(&mut self, lhs: &'a Float, round: Round) -> Ordering
Performs the division. Read more
impl Pow<Float> for Float
[src]
type Output = Float
The resulting type after the power operation.
fn pow(self, rhs: Float) -> Float
Performs the power operation. Read more
impl<'a> Pow<&'a Float> for Float
[src]
type Output = Float
The resulting type after the power operation.
fn pow(self, rhs: &'a Float) -> Float
Performs the power operation. Read more
impl PowAssign<Float> for Float
[src]
fn pow_assign(&mut self, rhs: Float)
Peforms the power operation. Read more
impl<'a> PowAssign<&'a Float> for Float
[src]
fn pow_assign(&mut self, rhs: &'a Float)
Peforms the power operation. Read more
impl PowAssignRound<Float> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn pow_assign_round(&mut self, rhs: Float, round: Round) -> Ordering
Performs the power operation. Read more
impl<'a> PowAssignRound<&'a Float> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn pow_assign_round(&mut self, rhs: &'a Float, round: Round) -> Ordering
Performs the power operation. Read more
impl<'a> Pow<&'a Float> for &'a Float
[src]
type Output = PowRef<'a>
The resulting type after the power operation.
fn pow(self, rhs: &'a Float) -> PowRef<'a>
Performs the power operation. Read more
impl<'a> AssignRound<PowRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: PowRef, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> Pow<Float> for &'a Float
[src]
type Output = Float
The resulting type after the power operation.
fn pow(self, rhs: Float) -> Float
Performs the power operation. Read more
impl PowFrom<Float> for Float
[src]
impl<'a> PowFrom<&'a Float> for Float
[src]
impl<'a> PowFromRound<Float> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn pow_from_round(&mut self, lhs: Float, round: Round) -> Ordering
Performs the power operation. Read more
impl<'a> PowFromRound<&'a Float> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn pow_from_round(&mut self, lhs: &'a Float, round: Round) -> Ordering
Performs the power operation. Read more
impl Add<Integer> for Float
[src]
type Output = Float
The resulting type after applying the +
operator
fn add(self, rhs: Integer) -> Float
The method for the +
operator
impl<'a> Add<&'a Integer> for Float
[src]
type Output = Float
The resulting type after applying the +
operator
fn add(self, rhs: &'a Integer) -> Float
The method for the +
operator
impl AddAssign<Integer> for Float
[src]
fn add_assign(&mut self, rhs: Integer)
The method for the +=
operator
impl<'a> AddAssign<&'a Integer> for Float
[src]
fn add_assign(&mut self, rhs: &'a Integer)
The method for the +=
operator
impl AddAssignRound<Integer> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn add_assign_round(&mut self, rhs: Integer, round: Round) -> Ordering
Performs the addition. Read more
impl<'a> AddAssignRound<&'a Integer> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn add_assign_round(&mut self, rhs: &'a Integer, round: Round) -> Ordering
Performs the addition. Read more
impl<'a> Add<&'a Integer> for &'a Float
[src]
type Output = AddRefInteger<'a>
The resulting type after applying the +
operator
fn add(self, rhs: &'a Integer) -> AddRefInteger<'a>
The method for the +
operator
impl<'a> AssignRound<AddRefInteger<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AddRefInteger, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> Add<Integer> for &'a Float
[src]
type Output = AddRefIntegerOwn<'a>
The resulting type after applying the +
operator
fn add(self, rhs: Integer) -> AddRefIntegerOwn<'a>
The method for the +
operator
impl<'a> AssignRound<AddRefIntegerOwn<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AddRefIntegerOwn, round: Round) -> Ordering
Peforms the assignment. Read more
impl AddFrom<Integer> for Float
[src]
impl<'a> AddFrom<&'a Integer> for Float
[src]
impl AddFromRound<Integer> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn add_from_round(&mut self, lhs: Integer, round: Round) -> Ordering
Performs the addition. Read more
impl<'a> AddFromRound<&'a Integer> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn add_from_round(&mut self, lhs: &'a Integer, round: Round) -> Ordering
Performs the addition. Read more
impl Sub<Integer> for Float
[src]
type Output = Float
The resulting type after applying the -
operator
fn sub(self, rhs: Integer) -> Float
The method for the -
operator
impl<'a> Sub<&'a Integer> for Float
[src]
type Output = Float
The resulting type after applying the -
operator
fn sub(self, rhs: &'a Integer) -> Float
The method for the -
operator
impl SubAssign<Integer> for Float
[src]
fn sub_assign(&mut self, rhs: Integer)
The method for the -=
operator
impl<'a> SubAssign<&'a Integer> for Float
[src]
fn sub_assign(&mut self, rhs: &'a Integer)
The method for the -=
operator
impl SubAssignRound<Integer> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn sub_assign_round(&mut self, rhs: Integer, round: Round) -> Ordering
Performs the subtraction. Read more
impl<'a> SubAssignRound<&'a Integer> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn sub_assign_round(&mut self, rhs: &'a Integer, round: Round) -> Ordering
Performs the subtraction. Read more
impl<'a> Sub<&'a Integer> for &'a Float
[src]
type Output = SubRefInteger<'a>
The resulting type after applying the -
operator
fn sub(self, rhs: &'a Integer) -> SubRefInteger<'a>
The method for the -
operator
impl<'a> AssignRound<SubRefInteger<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SubRefInteger, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> Sub<Integer> for &'a Float
[src]
type Output = SubFromRefInteger<'a>
The resulting type after applying the -
operator
fn sub(self, rhs: Integer) -> SubFromRefInteger<'a>
The method for the -
operator
impl<'a> AssignRound<SubFromRefInteger<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SubFromRefInteger, round: Round) -> Ordering
Peforms the assignment. Read more
impl SubFrom<Integer> for Float
[src]
impl<'a> SubFrom<&'a Integer> for Float
[src]
impl SubFromRound<Integer> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn sub_from_round(&mut self, lhs: Integer, round: Round) -> Ordering
Performs the subtraction. Read more
impl<'a> SubFromRound<&'a Integer> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn sub_from_round(&mut self, lhs: &'a Integer, round: Round) -> Ordering
Performs the subtraction. Read more
impl<'a> AssignRound<SubRefIntegerOwn<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SubRefIntegerOwn, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<SubFromRefIntegerOwn<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SubFromRefIntegerOwn, round: Round) -> Ordering
Peforms the assignment. Read more
impl Mul<Integer> for Float
[src]
type Output = Float
The resulting type after applying the *
operator
fn mul(self, rhs: Integer) -> Float
The method for the *
operator
impl<'a> Mul<&'a Integer> for Float
[src]
type Output = Float
The resulting type after applying the *
operator
fn mul(self, rhs: &'a Integer) -> Float
The method for the *
operator
impl MulAssign<Integer> for Float
[src]
fn mul_assign(&mut self, rhs: Integer)
The method for the *=
operator
impl<'a> MulAssign<&'a Integer> for Float
[src]
fn mul_assign(&mut self, rhs: &'a Integer)
The method for the *=
operator
impl MulAssignRound<Integer> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn mul_assign_round(&mut self, rhs: Integer, round: Round) -> Ordering
Performs the multiplication. Read more
impl<'a> MulAssignRound<&'a Integer> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn mul_assign_round(&mut self, rhs: &'a Integer, round: Round) -> Ordering
Performs the multiplication. Read more
impl<'a> Mul<&'a Integer> for &'a Float
[src]
type Output = MulRefInteger<'a>
The resulting type after applying the *
operator
fn mul(self, rhs: &'a Integer) -> MulRefInteger<'a>
The method for the *
operator
impl<'a> AssignRound<MulRefInteger<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: MulRefInteger, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> Mul<Integer> for &'a Float
[src]
type Output = MulRefIntegerOwn<'a>
The resulting type after applying the *
operator
fn mul(self, rhs: Integer) -> MulRefIntegerOwn<'a>
The method for the *
operator
impl<'a> AssignRound<MulRefIntegerOwn<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: MulRefIntegerOwn, round: Round) -> Ordering
Peforms the assignment. Read more
impl MulFrom<Integer> for Float
[src]
impl<'a> MulFrom<&'a Integer> for Float
[src]
impl MulFromRound<Integer> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn mul_from_round(&mut self, lhs: Integer, round: Round) -> Ordering
Performs the multiplication. Read more
impl<'a> MulFromRound<&'a Integer> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn mul_from_round(&mut self, lhs: &'a Integer, round: Round) -> Ordering
Performs the multiplication. Read more
impl Div<Integer> for Float
[src]
type Output = Float
The resulting type after applying the /
operator
fn div(self, rhs: Integer) -> Float
The method for the /
operator
impl<'a> Div<&'a Integer> for Float
[src]
type Output = Float
The resulting type after applying the /
operator
fn div(self, rhs: &'a Integer) -> Float
The method for the /
operator
impl DivAssign<Integer> for Float
[src]
fn div_assign(&mut self, rhs: Integer)
The method for the /=
operator
impl<'a> DivAssign<&'a Integer> for Float
[src]
fn div_assign(&mut self, rhs: &'a Integer)
The method for the /=
operator
impl DivAssignRound<Integer> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn div_assign_round(&mut self, rhs: Integer, round: Round) -> Ordering
Performs the division. Read more
impl<'a> DivAssignRound<&'a Integer> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn div_assign_round(&mut self, rhs: &'a Integer, round: Round) -> Ordering
Performs the division. Read more
impl<'a> Div<&'a Integer> for &'a Float
[src]
type Output = DivRefInteger<'a>
The resulting type after applying the /
operator
fn div(self, rhs: &'a Integer) -> DivRefInteger<'a>
The method for the /
operator
impl<'a> AssignRound<DivRefInteger<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: DivRefInteger, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> Div<Integer> for &'a Float
[src]
type Output = DivFromRefInteger<'a>
The resulting type after applying the /
operator
fn div(self, rhs: Integer) -> DivFromRefInteger<'a>
The method for the /
operator
impl<'a> AssignRound<DivFromRefInteger<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: DivFromRefInteger, round: Round) -> Ordering
Peforms the assignment. Read more
impl DivFrom<Integer> for Float
[src]
impl<'a> DivFrom<&'a Integer> for Float
[src]
impl DivFromRound<Integer> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn div_from_round(&mut self, lhs: Integer, round: Round) -> Ordering
Performs the division. Read more
impl<'a> DivFromRound<&'a Integer> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn div_from_round(&mut self, lhs: &'a Integer, round: Round) -> Ordering
Performs the division. Read more
impl<'a> AssignRound<DivRefIntegerOwn<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: DivRefIntegerOwn, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<DivFromRefIntegerOwn<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: DivFromRefIntegerOwn, round: Round) -> Ordering
Peforms the assignment. Read more
impl Pow<Integer> for Float
[src]
type Output = Float
The resulting type after the power operation.
fn pow(self, rhs: Integer) -> Float
Performs the power operation. Read more
impl<'a> Pow<&'a Integer> for Float
[src]
type Output = Float
The resulting type after the power operation.
fn pow(self, rhs: &'a Integer) -> Float
Performs the power operation. Read more
impl PowAssign<Integer> for Float
[src]
fn pow_assign(&mut self, rhs: Integer)
Peforms the power operation. Read more
impl<'a> PowAssign<&'a Integer> for Float
[src]
fn pow_assign(&mut self, rhs: &'a Integer)
Peforms the power operation. Read more
impl PowAssignRound<Integer> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn pow_assign_round(&mut self, rhs: Integer, round: Round) -> Ordering
Performs the power operation. Read more
impl<'a> PowAssignRound<&'a Integer> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn pow_assign_round(&mut self, rhs: &'a Integer, round: Round) -> Ordering
Performs the power operation. Read more
impl<'a> Pow<&'a Integer> for &'a Float
[src]
type Output = PowRefInteger<'a>
The resulting type after the power operation.
fn pow(self, rhs: &'a Integer) -> PowRefInteger<'a>
Performs the power operation. Read more
impl<'a> AssignRound<PowRefInteger<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: PowRefInteger, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> Pow<Integer> for &'a Float
[src]
type Output = PowRefIntegerOwn<'a>
The resulting type after the power operation.
fn pow(self, rhs: Integer) -> PowRefIntegerOwn<'a>
Performs the power operation. Read more
impl<'a> AssignRound<PowRefIntegerOwn<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: PowRefIntegerOwn, round: Round) -> Ordering
Peforms the assignment. Read more
impl Add<Rational> for Float
[src]
type Output = Float
The resulting type after applying the +
operator
fn add(self, rhs: Rational) -> Float
The method for the +
operator
impl<'a> Add<&'a Rational> for Float
[src]
type Output = Float
The resulting type after applying the +
operator
fn add(self, rhs: &'a Rational) -> Float
The method for the +
operator
impl AddAssign<Rational> for Float
[src]
fn add_assign(&mut self, rhs: Rational)
The method for the +=
operator
impl<'a> AddAssign<&'a Rational> for Float
[src]
fn add_assign(&mut self, rhs: &'a Rational)
The method for the +=
operator
impl AddAssignRound<Rational> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn add_assign_round(&mut self, rhs: Rational, round: Round) -> Ordering
Performs the addition. Read more
impl<'a> AddAssignRound<&'a Rational> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn add_assign_round(&mut self, rhs: &'a Rational, round: Round) -> Ordering
Performs the addition. Read more
impl<'a> Add<&'a Rational> for &'a Float
[src]
type Output = AddRefRational<'a>
The resulting type after applying the +
operator
fn add(self, rhs: &'a Rational) -> AddRefRational<'a>
The method for the +
operator
impl<'a> AssignRound<AddRefRational<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AddRefRational, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> Add<Rational> for &'a Float
[src]
type Output = AddRefRationalOwn<'a>
The resulting type after applying the +
operator
fn add(self, rhs: Rational) -> AddRefRationalOwn<'a>
The method for the +
operator
impl<'a> AssignRound<AddRefRationalOwn<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AddRefRationalOwn, round: Round) -> Ordering
Peforms the assignment. Read more
impl AddFrom<Rational> for Float
[src]
impl<'a> AddFrom<&'a Rational> for Float
[src]
impl AddFromRound<Rational> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn add_from_round(&mut self, lhs: Rational, round: Round) -> Ordering
Performs the addition. Read more
impl<'a> AddFromRound<&'a Rational> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn add_from_round(&mut self, lhs: &'a Rational, round: Round) -> Ordering
Performs the addition. Read more
impl Sub<Rational> for Float
[src]
type Output = Float
The resulting type after applying the -
operator
fn sub(self, rhs: Rational) -> Float
The method for the -
operator
impl<'a> Sub<&'a Rational> for Float
[src]
type Output = Float
The resulting type after applying the -
operator
fn sub(self, rhs: &'a Rational) -> Float
The method for the -
operator
impl SubAssign<Rational> for Float
[src]
fn sub_assign(&mut self, rhs: Rational)
The method for the -=
operator
impl<'a> SubAssign<&'a Rational> for Float
[src]
fn sub_assign(&mut self, rhs: &'a Rational)
The method for the -=
operator
impl SubAssignRound<Rational> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn sub_assign_round(&mut self, rhs: Rational, round: Round) -> Ordering
Performs the subtraction. Read more
impl<'a> SubAssignRound<&'a Rational> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn sub_assign_round(&mut self, rhs: &'a Rational, round: Round) -> Ordering
Performs the subtraction. Read more
impl<'a> Sub<&'a Rational> for &'a Float
[src]
type Output = SubRefRational<'a>
The resulting type after applying the -
operator
fn sub(self, rhs: &'a Rational) -> SubRefRational<'a>
The method for the -
operator
impl<'a> AssignRound<SubRefRational<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SubRefRational, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> Sub<Rational> for &'a Float
[src]
type Output = SubFromRefRational<'a>
The resulting type after applying the -
operator
fn sub(self, rhs: Rational) -> SubFromRefRational<'a>
The method for the -
operator
impl<'a> AssignRound<SubFromRefRational<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SubFromRefRational, round: Round) -> Ordering
Peforms the assignment. Read more
impl SubFrom<Rational> for Float
[src]
impl<'a> SubFrom<&'a Rational> for Float
[src]
impl SubFromRound<Rational> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn sub_from_round(&mut self, lhs: Rational, round: Round) -> Ordering
Performs the subtraction. Read more
impl<'a> SubFromRound<&'a Rational> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn sub_from_round(&mut self, lhs: &'a Rational, round: Round) -> Ordering
Performs the subtraction. Read more
impl<'a> AssignRound<SubRefRationalOwn<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SubRefRationalOwn, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<SubFromRefRationalOwn<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SubFromRefRationalOwn, round: Round) -> Ordering
Peforms the assignment. Read more
impl Mul<Rational> for Float
[src]
type Output = Float
The resulting type after applying the *
operator
fn mul(self, rhs: Rational) -> Float
The method for the *
operator
impl<'a> Mul<&'a Rational> for Float
[src]
type Output = Float
The resulting type after applying the *
operator
fn mul(self, rhs: &'a Rational) -> Float
The method for the *
operator
impl MulAssign<Rational> for Float
[src]
fn mul_assign(&mut self, rhs: Rational)
The method for the *=
operator
impl<'a> MulAssign<&'a Rational> for Float
[src]
fn mul_assign(&mut self, rhs: &'a Rational)
The method for the *=
operator
impl MulAssignRound<Rational> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn mul_assign_round(&mut self, rhs: Rational, round: Round) -> Ordering
Performs the multiplication. Read more
impl<'a> MulAssignRound<&'a Rational> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn mul_assign_round(&mut self, rhs: &'a Rational, round: Round) -> Ordering
Performs the multiplication. Read more
impl<'a> Mul<&'a Rational> for &'a Float
[src]
type Output = MulRefRational<'a>
The resulting type after applying the *
operator
fn mul(self, rhs: &'a Rational) -> MulRefRational<'a>
The method for the *
operator
impl<'a> AssignRound<MulRefRational<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: MulRefRational, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> Mul<Rational> for &'a Float
[src]
type Output = MulRefRationalOwn<'a>
The resulting type after applying the *
operator
fn mul(self, rhs: Rational) -> MulRefRationalOwn<'a>
The method for the *
operator
impl<'a> AssignRound<MulRefRationalOwn<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: MulRefRationalOwn, round: Round) -> Ordering
Peforms the assignment. Read more
impl MulFrom<Rational> for Float
[src]
impl<'a> MulFrom<&'a Rational> for Float
[src]
impl MulFromRound<Rational> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn mul_from_round(&mut self, lhs: Rational, round: Round) -> Ordering
Performs the multiplication. Read more
impl<'a> MulFromRound<&'a Rational> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn mul_from_round(&mut self, lhs: &'a Rational, round: Round) -> Ordering
Performs the multiplication. Read more
impl Div<Rational> for Float
[src]
type Output = Float
The resulting type after applying the /
operator
fn div(self, rhs: Rational) -> Float
The method for the /
operator
impl<'a> Div<&'a Rational> for Float
[src]
type Output = Float
The resulting type after applying the /
operator
fn div(self, rhs: &'a Rational) -> Float
The method for the /
operator
impl DivAssign<Rational> for Float
[src]
fn div_assign(&mut self, rhs: Rational)
The method for the /=
operator
impl<'a> DivAssign<&'a Rational> for Float
[src]
fn div_assign(&mut self, rhs: &'a Rational)
The method for the /=
operator
impl DivAssignRound<Rational> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn div_assign_round(&mut self, rhs: Rational, round: Round) -> Ordering
Performs the division. Read more
impl<'a> DivAssignRound<&'a Rational> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn div_assign_round(&mut self, rhs: &'a Rational, round: Round) -> Ordering
Performs the division. Read more
impl<'a> Div<&'a Rational> for &'a Float
[src]
type Output = DivRefRational<'a>
The resulting type after applying the /
operator
fn div(self, rhs: &'a Rational) -> DivRefRational<'a>
The method for the /
operator
impl<'a> AssignRound<DivRefRational<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: DivRefRational, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> Div<Rational> for &'a Float
[src]
type Output = DivFromRefRational<'a>
The resulting type after applying the /
operator
fn div(self, rhs: Rational) -> DivFromRefRational<'a>
The method for the /
operator
impl<'a> AssignRound<DivFromRefRational<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: DivFromRefRational, round: Round) -> Ordering
Peforms the assignment. Read more
impl DivFrom<Rational> for Float
[src]
impl<'a> DivFrom<&'a Rational> for Float
[src]
impl DivFromRound<Rational> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn div_from_round(&mut self, lhs: Rational, round: Round) -> Ordering
Performs the division. Read more
impl<'a> DivFromRound<&'a Rational> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn div_from_round(&mut self, lhs: &'a Rational, round: Round) -> Ordering
Performs the division. Read more
impl<'a> AssignRound<DivRefRationalOwn<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: DivRefRationalOwn, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<DivFromRefRationalOwn<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: DivFromRefRationalOwn, round: Round) -> Ordering
Peforms the assignment. Read more
impl AssignRound<i32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, val: i32, round: Round) -> Ordering
Peforms the assignment. Read more
impl Add<i32> for Float
[src]
type Output = Float
The resulting type after applying the +
operator
fn add(self, rhs: i32) -> Float
The method for the +
operator
impl AddAssign<i32> for Float
[src]
fn add_assign(&mut self, rhs: i32)
The method for the +=
operator
impl<'a> Add<i32> for &'a Float
[src]
type Output = AddRefI32<'a>
The resulting type after applying the +
operator
fn add(self, rhs: i32) -> AddRefI32<'a>
The method for the +
operator
impl<'a> AssignRound<AddRefI32<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AddRefI32, round: Round) -> Ordering
Peforms the assignment. Read more
impl AddAssignRound<i32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn add_assign_round(&mut self, rhs: i32, round: Round) -> Ordering
Performs the addition. Read more
impl<'a> AddFrom<i32> for Float
[src]
impl<'a> AddFromRound<i32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn add_from_round(&mut self, lhs: i32, round: Round) -> Ordering
Performs the addition. Read more
impl Sub<i32> for Float
[src]
type Output = Float
The resulting type after applying the -
operator
fn sub(self, rhs: i32) -> Float
The method for the -
operator
impl SubAssign<i32> for Float
[src]
fn sub_assign(&mut self, rhs: i32)
The method for the -=
operator
impl<'a> Sub<i32> for &'a Float
[src]
type Output = SubRefI32<'a>
The resulting type after applying the -
operator
fn sub(self, rhs: i32) -> SubRefI32<'a>
The method for the -
operator
impl<'a> AssignRound<SubRefI32<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SubRefI32, round: Round) -> Ordering
Peforms the assignment. Read more
impl SubAssignRound<i32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn sub_assign_round(&mut self, rhs: i32, round: Round) -> Ordering
Performs the subtraction. Read more
impl<'a> SubFrom<i32> for Float
[src]
impl<'a> SubFromRound<i32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn sub_from_round(&mut self, lhs: i32, round: Round) -> Ordering
Performs the subtraction. Read more
impl<'a> AssignRound<SubFromRefI32<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SubFromRefI32, round: Round) -> Ordering
Peforms the assignment. Read more
impl Mul<i32> for Float
[src]
type Output = Float
The resulting type after applying the *
operator
fn mul(self, rhs: i32) -> Float
The method for the *
operator
impl MulAssign<i32> for Float
[src]
fn mul_assign(&mut self, rhs: i32)
The method for the *=
operator
impl<'a> Mul<i32> for &'a Float
[src]
type Output = MulRefI32<'a>
The resulting type after applying the *
operator
fn mul(self, rhs: i32) -> MulRefI32<'a>
The method for the *
operator
impl<'a> AssignRound<MulRefI32<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: MulRefI32, round: Round) -> Ordering
Peforms the assignment. Read more
impl MulAssignRound<i32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn mul_assign_round(&mut self, rhs: i32, round: Round) -> Ordering
Performs the multiplication. Read more
impl<'a> MulFrom<i32> for Float
[src]
impl<'a> MulFromRound<i32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn mul_from_round(&mut self, lhs: i32, round: Round) -> Ordering
Performs the multiplication. Read more
impl Div<i32> for Float
[src]
type Output = Float
The resulting type after applying the /
operator
fn div(self, rhs: i32) -> Float
The method for the /
operator
impl DivAssign<i32> for Float
[src]
fn div_assign(&mut self, rhs: i32)
The method for the /=
operator
impl<'a> Div<i32> for &'a Float
[src]
type Output = DivRefI32<'a>
The resulting type after applying the /
operator
fn div(self, rhs: i32) -> DivRefI32<'a>
The method for the /
operator
impl<'a> AssignRound<DivRefI32<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: DivRefI32, round: Round) -> Ordering
Peforms the assignment. Read more
impl DivAssignRound<i32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn div_assign_round(&mut self, rhs: i32, round: Round) -> Ordering
Performs the division. Read more
impl<'a> DivFrom<i32> for Float
[src]
impl<'a> DivFromRound<i32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn div_from_round(&mut self, lhs: i32, round: Round) -> Ordering
Performs the division. Read more
impl<'a> AssignRound<DivFromRefI32<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: DivFromRefI32, round: Round) -> Ordering
Peforms the assignment. Read more
impl AssignRound<i64> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, other: i64, round: Round) -> Ordering
Peforms the assignment. Read more
impl AssignRound<u32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, val: u32, round: Round) -> Ordering
Peforms the assignment. Read more
impl Add<u32> for Float
[src]
type Output = Float
The resulting type after applying the +
operator
fn add(self, rhs: u32) -> Float
The method for the +
operator
impl AddAssign<u32> for Float
[src]
fn add_assign(&mut self, rhs: u32)
The method for the +=
operator
impl<'a> Add<u32> for &'a Float
[src]
type Output = AddRefU32<'a>
The resulting type after applying the +
operator
fn add(self, rhs: u32) -> AddRefU32<'a>
The method for the +
operator
impl<'a> AssignRound<AddRefU32<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AddRefU32, round: Round) -> Ordering
Peforms the assignment. Read more
impl AddAssignRound<u32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn add_assign_round(&mut self, rhs: u32, round: Round) -> Ordering
Performs the addition. Read more
impl<'a> AddFrom<u32> for Float
[src]
impl<'a> AddFromRound<u32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn add_from_round(&mut self, lhs: u32, round: Round) -> Ordering
Performs the addition. Read more
impl Sub<u32> for Float
[src]
type Output = Float
The resulting type after applying the -
operator
fn sub(self, rhs: u32) -> Float
The method for the -
operator
impl SubAssign<u32> for Float
[src]
fn sub_assign(&mut self, rhs: u32)
The method for the -=
operator
impl<'a> Sub<u32> for &'a Float
[src]
type Output = SubRefU32<'a>
The resulting type after applying the -
operator
fn sub(self, rhs: u32) -> SubRefU32<'a>
The method for the -
operator
impl<'a> AssignRound<SubRefU32<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SubRefU32, round: Round) -> Ordering
Peforms the assignment. Read more
impl SubAssignRound<u32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn sub_assign_round(&mut self, rhs: u32, round: Round) -> Ordering
Performs the subtraction. Read more
impl<'a> SubFrom<u32> for Float
[src]
impl<'a> SubFromRound<u32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn sub_from_round(&mut self, lhs: u32, round: Round) -> Ordering
Performs the subtraction. Read more
impl<'a> AssignRound<SubFromRefU32<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SubFromRefU32, round: Round) -> Ordering
Peforms the assignment. Read more
impl Mul<u32> for Float
[src]
type Output = Float
The resulting type after applying the *
operator
fn mul(self, rhs: u32) -> Float
The method for the *
operator
impl MulAssign<u32> for Float
[src]
fn mul_assign(&mut self, rhs: u32)
The method for the *=
operator
impl<'a> Mul<u32> for &'a Float
[src]
type Output = MulRefU32<'a>
The resulting type after applying the *
operator
fn mul(self, rhs: u32) -> MulRefU32<'a>
The method for the *
operator
impl<'a> AssignRound<MulRefU32<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: MulRefU32, round: Round) -> Ordering
Peforms the assignment. Read more
impl MulAssignRound<u32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn mul_assign_round(&mut self, rhs: u32, round: Round) -> Ordering
Performs the multiplication. Read more
impl<'a> MulFrom<u32> for Float
[src]
impl<'a> MulFromRound<u32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn mul_from_round(&mut self, lhs: u32, round: Round) -> Ordering
Performs the multiplication. Read more
impl Div<u32> for Float
[src]
type Output = Float
The resulting type after applying the /
operator
fn div(self, rhs: u32) -> Float
The method for the /
operator
impl DivAssign<u32> for Float
[src]
fn div_assign(&mut self, rhs: u32)
The method for the /=
operator
impl<'a> Div<u32> for &'a Float
[src]
type Output = DivRefU32<'a>
The resulting type after applying the /
operator
fn div(self, rhs: u32) -> DivRefU32<'a>
The method for the /
operator
impl<'a> AssignRound<DivRefU32<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: DivRefU32, round: Round) -> Ordering
Peforms the assignment. Read more
impl DivAssignRound<u32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn div_assign_round(&mut self, rhs: u32, round: Round) -> Ordering
Performs the division. Read more
impl<'a> DivFrom<u32> for Float
[src]
impl<'a> DivFromRound<u32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn div_from_round(&mut self, lhs: u32, round: Round) -> Ordering
Performs the division. Read more
impl<'a> AssignRound<DivFromRefU32<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: DivFromRefU32, round: Round) -> Ordering
Peforms the assignment. Read more
impl AssignRound<u64> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, other: u64, round: Round) -> Ordering
Peforms the assignment. Read more
impl AssignRound<f32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, val: f32, round: Round) -> Ordering
Peforms the assignment. Read more
impl Add<f32> for Float
[src]
type Output = Float
The resulting type after applying the +
operator
fn add(self, rhs: f32) -> Float
The method for the +
operator
impl AddAssign<f32> for Float
[src]
fn add_assign(&mut self, rhs: f32)
The method for the +=
operator
impl<'a> Add<f32> for &'a Float
[src]
type Output = AddRefF32<'a>
The resulting type after applying the +
operator
fn add(self, rhs: f32) -> AddRefF32<'a>
The method for the +
operator
impl<'a> AssignRound<AddRefF32<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AddRefF32, round: Round) -> Ordering
Peforms the assignment. Read more
impl AddAssignRound<f32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn add_assign_round(&mut self, rhs: f32, round: Round) -> Ordering
Performs the addition. Read more
impl<'a> AddFrom<f32> for Float
[src]
impl<'a> AddFromRound<f32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn add_from_round(&mut self, lhs: f32, round: Round) -> Ordering
Performs the addition. Read more
impl Sub<f32> for Float
[src]
type Output = Float
The resulting type after applying the -
operator
fn sub(self, rhs: f32) -> Float
The method for the -
operator
impl SubAssign<f32> for Float
[src]
fn sub_assign(&mut self, rhs: f32)
The method for the -=
operator
impl<'a> Sub<f32> for &'a Float
[src]
type Output = SubRefF32<'a>
The resulting type after applying the -
operator
fn sub(self, rhs: f32) -> SubRefF32<'a>
The method for the -
operator
impl<'a> AssignRound<SubRefF32<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SubRefF32, round: Round) -> Ordering
Peforms the assignment. Read more
impl SubAssignRound<f32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn sub_assign_round(&mut self, rhs: f32, round: Round) -> Ordering
Performs the subtraction. Read more
impl<'a> SubFrom<f32> for Float
[src]
impl<'a> SubFromRound<f32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn sub_from_round(&mut self, lhs: f32, round: Round) -> Ordering
Performs the subtraction. Read more
impl<'a> AssignRound<SubFromRefF32<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SubFromRefF32, round: Round) -> Ordering
Peforms the assignment. Read more
impl Mul<f32> for Float
[src]
type Output = Float
The resulting type after applying the *
operator
fn mul(self, rhs: f32) -> Float
The method for the *
operator
impl MulAssign<f32> for Float
[src]
fn mul_assign(&mut self, rhs: f32)
The method for the *=
operator
impl<'a> Mul<f32> for &'a Float
[src]
type Output = MulRefF32<'a>
The resulting type after applying the *
operator
fn mul(self, rhs: f32) -> MulRefF32<'a>
The method for the *
operator
impl<'a> AssignRound<MulRefF32<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: MulRefF32, round: Round) -> Ordering
Peforms the assignment. Read more
impl MulAssignRound<f32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn mul_assign_round(&mut self, rhs: f32, round: Round) -> Ordering
Performs the multiplication. Read more
impl<'a> MulFrom<f32> for Float
[src]
impl<'a> MulFromRound<f32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn mul_from_round(&mut self, lhs: f32, round: Round) -> Ordering
Performs the multiplication. Read more
impl Div<f32> for Float
[src]
type Output = Float
The resulting type after applying the /
operator
fn div(self, rhs: f32) -> Float
The method for the /
operator
impl DivAssign<f32> for Float
[src]
fn div_assign(&mut self, rhs: f32)
The method for the /=
operator
impl<'a> Div<f32> for &'a Float
[src]
type Output = DivRefF32<'a>
The resulting type after applying the /
operator
fn div(self, rhs: f32) -> DivRefF32<'a>
The method for the /
operator
impl<'a> AssignRound<DivRefF32<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: DivRefF32, round: Round) -> Ordering
Peforms the assignment. Read more
impl DivAssignRound<f32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn div_assign_round(&mut self, rhs: f32, round: Round) -> Ordering
Performs the division. Read more
impl<'a> DivFrom<f32> for Float
[src]
impl<'a> DivFromRound<f32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn div_from_round(&mut self, lhs: f32, round: Round) -> Ordering
Performs the division. Read more
impl<'a> AssignRound<DivFromRefF32<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: DivFromRefF32, round: Round) -> Ordering
Peforms the assignment. Read more
impl AssignRound<f64> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, val: f64, round: Round) -> Ordering
Peforms the assignment. Read more
impl Add<f64> for Float
[src]
type Output = Float
The resulting type after applying the +
operator
fn add(self, rhs: f64) -> Float
The method for the +
operator
impl AddAssign<f64> for Float
[src]
fn add_assign(&mut self, rhs: f64)
The method for the +=
operator
impl<'a> Add<f64> for &'a Float
[src]
type Output = AddRefF64<'a>
The resulting type after applying the +
operator
fn add(self, rhs: f64) -> AddRefF64<'a>
The method for the +
operator
impl<'a> AssignRound<AddRefF64<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AddRefF64, round: Round) -> Ordering
Peforms the assignment. Read more
impl AddAssignRound<f64> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn add_assign_round(&mut self, rhs: f64, round: Round) -> Ordering
Performs the addition. Read more
impl<'a> AddFrom<f64> for Float
[src]
impl<'a> AddFromRound<f64> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn add_from_round(&mut self, lhs: f64, round: Round) -> Ordering
Performs the addition. Read more
impl Sub<f64> for Float
[src]
type Output = Float
The resulting type after applying the -
operator
fn sub(self, rhs: f64) -> Float
The method for the -
operator
impl SubAssign<f64> for Float
[src]
fn sub_assign(&mut self, rhs: f64)
The method for the -=
operator
impl<'a> Sub<f64> for &'a Float
[src]
type Output = SubRefF64<'a>
The resulting type after applying the -
operator
fn sub(self, rhs: f64) -> SubRefF64<'a>
The method for the -
operator
impl<'a> AssignRound<SubRefF64<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SubRefF64, round: Round) -> Ordering
Peforms the assignment. Read more
impl SubAssignRound<f64> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn sub_assign_round(&mut self, rhs: f64, round: Round) -> Ordering
Performs the subtraction. Read more
impl<'a> SubFrom<f64> for Float
[src]
impl<'a> SubFromRound<f64> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn sub_from_round(&mut self, lhs: f64, round: Round) -> Ordering
Performs the subtraction. Read more
impl<'a> AssignRound<SubFromRefF64<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SubFromRefF64, round: Round) -> Ordering
Peforms the assignment. Read more
impl Mul<f64> for Float
[src]
type Output = Float
The resulting type after applying the *
operator
fn mul(self, rhs: f64) -> Float
The method for the *
operator
impl MulAssign<f64> for Float
[src]
fn mul_assign(&mut self, rhs: f64)
The method for the *=
operator
impl<'a> Mul<f64> for &'a Float
[src]
type Output = MulRefF64<'a>
The resulting type after applying the *
operator
fn mul(self, rhs: f64) -> MulRefF64<'a>
The method for the *
operator
impl<'a> AssignRound<MulRefF64<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: MulRefF64, round: Round) -> Ordering
Peforms the assignment. Read more
impl MulAssignRound<f64> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn mul_assign_round(&mut self, rhs: f64, round: Round) -> Ordering
Performs the multiplication. Read more
impl<'a> MulFrom<f64> for Float
[src]
impl<'a> MulFromRound<f64> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn mul_from_round(&mut self, lhs: f64, round: Round) -> Ordering
Performs the multiplication. Read more
impl Div<f64> for Float
[src]
type Output = Float
The resulting type after applying the /
operator
fn div(self, rhs: f64) -> Float
The method for the /
operator
impl DivAssign<f64> for Float
[src]
fn div_assign(&mut self, rhs: f64)
The method for the /=
operator
impl<'a> Div<f64> for &'a Float
[src]
type Output = DivRefF64<'a>
The resulting type after applying the /
operator
fn div(self, rhs: f64) -> DivRefF64<'a>
The method for the /
operator
impl<'a> AssignRound<DivRefF64<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: DivRefF64, round: Round) -> Ordering
Peforms the assignment. Read more
impl DivAssignRound<f64> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn div_assign_round(&mut self, rhs: f64, round: Round) -> Ordering
Performs the division. Read more
impl<'a> DivFrom<f64> for Float
[src]
impl<'a> DivFromRound<f64> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn div_from_round(&mut self, lhs: f64, round: Round) -> Ordering
Performs the division. Read more
impl<'a> AssignRound<DivFromRefF64<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: DivFromRefF64, round: Round) -> Ordering
Peforms the assignment. Read more
impl Shl<u32> for Float
[src]
type Output = Float
The resulting type after applying the <<
operator
fn shl(self, rhs: u32) -> Float
The method for the <<
operator
impl ShlAssign<u32> for Float
[src]
fn shl_assign(&mut self, rhs: u32)
The method for the <<=
operator
impl<'a> Shl<u32> for &'a Float
[src]
type Output = ShlRefU32<'a>
The resulting type after applying the <<
operator
fn shl(self, rhs: u32) -> ShlRefU32<'a>
The method for the <<
operator
impl<'a> AssignRound<ShlRefU32<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: ShlRefU32, round: Round) -> Ordering
Peforms the assignment. Read more
impl Shr<u32> for Float
[src]
type Output = Float
The resulting type after applying the >>
operator
fn shr(self, rhs: u32) -> Float
The method for the >>
operator
impl ShrAssign<u32> for Float
[src]
fn shr_assign(&mut self, rhs: u32)
The method for the >>=
operator
impl<'a> Shr<u32> for &'a Float
[src]
type Output = ShrRefU32<'a>
The resulting type after applying the >>
operator
fn shr(self, rhs: u32) -> ShrRefU32<'a>
The method for the >>
operator
impl<'a> AssignRound<ShrRefU32<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: ShrRefU32, round: Round) -> Ordering
Peforms the assignment. Read more
impl Pow<u32> for Float
[src]
type Output = Float
The resulting type after the power operation.
fn pow(self, rhs: u32) -> Float
Performs the power operation. Read more
impl PowAssign<u32> for Float
[src]
fn pow_assign(&mut self, rhs: u32)
Peforms the power operation. Read more
impl<'a> Pow<u32> for &'a Float
[src]
type Output = PowRefU32<'a>
The resulting type after the power operation.
fn pow(self, rhs: u32) -> PowRefU32<'a>
Performs the power operation. Read more
impl<'a> AssignRound<PowRefU32<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: PowRefU32, round: Round) -> Ordering
Peforms the assignment. Read more
impl PowAssignRound<u32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn pow_assign_round(&mut self, rhs: u32, round: Round) -> Ordering
Performs the power operation. Read more
impl<'a> PowFrom<u32> for Float
[src]
impl<'a> PowFromRound<u32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn pow_from_round(&mut self, lhs: u32, round: Round) -> Ordering
Performs the power operation. Read more
impl<'a> AssignRound<PowFromRefU32<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: PowFromRefU32, round: Round) -> Ordering
Peforms the assignment. Read more
impl Shl<i32> for Float
[src]
type Output = Float
The resulting type after applying the <<
operator
fn shl(self, rhs: i32) -> Float
The method for the <<
operator
impl ShlAssign<i32> for Float
[src]
fn shl_assign(&mut self, rhs: i32)
The method for the <<=
operator
impl<'a> Shl<i32> for &'a Float
[src]
type Output = ShlRefI32<'a>
The resulting type after applying the <<
operator
fn shl(self, rhs: i32) -> ShlRefI32<'a>
The method for the <<
operator
impl<'a> AssignRound<ShlRefI32<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: ShlRefI32, round: Round) -> Ordering
Peforms the assignment. Read more
impl Shr<i32> for Float
[src]
type Output = Float
The resulting type after applying the >>
operator
fn shr(self, rhs: i32) -> Float
The method for the >>
operator
impl ShrAssign<i32> for Float
[src]
fn shr_assign(&mut self, rhs: i32)
The method for the >>=
operator
impl<'a> Shr<i32> for &'a Float
[src]
type Output = ShrRefI32<'a>
The resulting type after applying the >>
operator
fn shr(self, rhs: i32) -> ShrRefI32<'a>
The method for the >>
operator
impl<'a> AssignRound<ShrRefI32<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: ShrRefI32, round: Round) -> Ordering
Peforms the assignment. Read more
impl Pow<i32> for Float
[src]
type Output = Float
The resulting type after the power operation.
fn pow(self, rhs: i32) -> Float
Performs the power operation. Read more
impl PowAssign<i32> for Float
[src]
fn pow_assign(&mut self, rhs: i32)
Peforms the power operation. Read more
impl<'a> Pow<i32> for &'a Float
[src]
type Output = PowRefI32<'a>
The resulting type after the power operation.
fn pow(self, rhs: i32) -> PowRefI32<'a>
Performs the power operation. Read more
impl<'a> AssignRound<PowRefI32<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: PowRefI32, round: Round) -> Ordering
Peforms the assignment. Read more
impl PowAssignRound<i32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn pow_assign_round(&mut self, rhs: i32, round: Round) -> Ordering
Performs the power operation. Read more
impl<'a> PowFrom<i32> for Float
[src]
impl<'a> PowFromRound<i32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn pow_from_round(&mut self, lhs: i32, round: Round) -> Ordering
Performs the power operation. Read more
impl<'a> AssignRound<PowFromRefI32<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: PowFromRefI32, round: Round) -> Ordering
Peforms the assignment. Read more
impl Pow<f64> for Float
[src]
type Output = Float
The resulting type after the power operation.
fn pow(self, rhs: f64) -> Float
Performs the power operation. Read more
impl PowAssign<f64> for Float
[src]
fn pow_assign(&mut self, rhs: f64)
Peforms the power operation. Read more
impl<'a> Pow<f64> for &'a Float
[src]
type Output = PowRefF64<'a>
The resulting type after the power operation.
fn pow(self, rhs: f64) -> PowRefF64<'a>
Performs the power operation. Read more
impl<'a> AssignRound<PowRefF64<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: PowRefF64, round: Round) -> Ordering
Peforms the assignment. Read more
impl PowAssignRound<f64> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn pow_assign_round(&mut self, rhs: f64, round: Round) -> Ordering
Performs the power operation. Read more
impl<'a> PowFrom<f64> for Float
[src]
impl<'a> PowFromRound<f64> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn pow_from_round(&mut self, lhs: f64, round: Round) -> Ordering
Performs the power operation. Read more
impl<'a> AssignRound<PowFromRefF64<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: PowFromRefF64, round: Round) -> Ordering
Peforms the assignment. Read more
impl Pow<f32> for Float
[src]
type Output = Float
The resulting type after the power operation.
fn pow(self, rhs: f32) -> Float
Performs the power operation. Read more
impl PowAssign<f32> for Float
[src]
fn pow_assign(&mut self, rhs: f32)
Peforms the power operation. Read more
impl<'a> Pow<f32> for &'a Float
[src]
type Output = PowRefF32<'a>
The resulting type after the power operation.
fn pow(self, rhs: f32) -> PowRefF32<'a>
Performs the power operation. Read more
impl<'a> AssignRound<PowRefF32<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: PowRefF32, round: Round) -> Ordering
Peforms the assignment. Read more
impl PowAssignRound<f32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn pow_assign_round(&mut self, rhs: f32, round: Round) -> Ordering
Performs the power operation. Read more
impl<'a> PowFrom<f32> for Float
[src]
impl<'a> PowFromRound<f32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn pow_from_round(&mut self, lhs: f32, round: Round) -> Ordering
Performs the power operation. Read more
impl<'a> AssignRound<PowFromRefF32<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: PowFromRefF32, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> Add<MulRef<'a>> for Float
[src]
type Output = Float
The resulting type after applying the +
operator
fn add(self, rhs: MulRef) -> Float
Peforms multiplication and addition together, with only one rounding operation to the nearest.
impl<'a> AddAssign<MulRef<'a>> for Float
[src]
fn add_assign(&mut self, rhs: MulRef)
Peforms multiplication and addition together, with only one rounding operation to the nearest.
impl<'a> AddAssignRound<MulRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn add_assign_round(&mut self, rhs: MulRef, round: Round) -> Ordering
Peforms multiplication and addition together with only one rounding operation as specified.
impl PartialEq for Float
[src]
fn eq(&self, other: &Float) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl PartialOrd for Float
[src]
fn partial_cmp(&self, other: &Float) -> Option<Ordering>
Returns the ordering of self
and other
,
or None
if one (or both) of them is a NaN.
fn lt(&self, other: &Float) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Float) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Float) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Float) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl PartialEq<Integer> for Float
[src]
fn eq(&self, other: &Integer) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl PartialOrd<Integer> for Float
[src]
fn partial_cmp(&self, other: &Integer) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl PartialEq<Rational> for Float
[src]
fn eq(&self, other: &Rational) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl PartialOrd<Rational> for Float
[src]
fn partial_cmp(&self, other: &Rational) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl PartialEq<u32> for Float
[src]
fn eq(&self, other: &u32) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl PartialOrd<u32> for Float
[src]
fn partial_cmp(&self, other: &u32) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl PartialEq<i32> for Float
[src]
fn eq(&self, other: &i32) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl PartialOrd<i32> for Float
[src]
fn partial_cmp(&self, other: &i32) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl PartialEq<f64> for Float
[src]
fn eq(&self, other: &f64) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl PartialOrd<f64> for Float
[src]
fn partial_cmp(&self, other: &f64) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl PartialEq<f32> for Float
[src]
fn eq(&self, other: &f32) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl PartialOrd<f32> for Float
[src]
fn partial_cmp(&self, other: &f32) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<'a> AssignRound<ValidFloat<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, rhs: ValidFloat, round: Round) -> Ordering
Peforms the assignment. Read more
impl Send for Float
[src]
impl Sync for Float
[src]
impl<'a> AssignRound<AbsRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AbsRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<ArgRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: ArgRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<NormRef<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: NormRef<'a>, round: Round) -> Ordering
Peforms the assignment. Read more
impl Add<Complex> for Float
[src]
type Output = Complex
The resulting type after applying the +
operator
fn add(self, rhs: Complex) -> Complex
The method for the +
operator
impl<'a> Add<Complex> for &'a Float
[src]
type Output = Complex
The resulting type after applying the +
operator
fn add(self, rhs: Complex) -> Complex
The method for the +
operator
impl<'a> Add<&'a Complex> for Float
[src]
type Output = AddRefFloatOwn<'a>
The resulting type after applying the +
operator
fn add(self, rhs: &'a Complex) -> AddRefFloatOwn<'a>
The method for the +
operator
impl<'a> Add<&'a Complex> for &'a Float
[src]
type Output = AddRefFloat<'a>
The resulting type after applying the +
operator
fn add(self, rhs: &'a Complex) -> AddRefFloat<'a>
The method for the +
operator
impl Sub<Complex> for Float
[src]
type Output = Complex
The resulting type after applying the -
operator
fn sub(self, rhs: Complex) -> Complex
The method for the -
operator
impl<'a> Sub<Complex> for &'a Float
[src]
type Output = Complex
The resulting type after applying the -
operator
fn sub(self, rhs: Complex) -> Complex
The method for the -
operator
impl<'a> Sub<&'a Complex> for Float
[src]
type Output = SubFromRefFloatOwn<'a>
The resulting type after applying the -
operator
fn sub(self, rhs: &'a Complex) -> SubFromRefFloatOwn<'a>
The method for the -
operator
impl<'a> Sub<&'a Complex> for &'a Float
[src]
type Output = SubRefFloatOwn<'a>
The resulting type after applying the -
operator
fn sub(self, rhs: &'a Complex) -> SubRefFloatOwn<'a>
The method for the -
operator
impl Mul<Complex> for Float
[src]
type Output = Complex
The resulting type after applying the *
operator
fn mul(self, rhs: Complex) -> Complex
The method for the *
operator
impl<'a> Mul<Complex> for &'a Float
[src]
type Output = Complex
The resulting type after applying the *
operator
fn mul(self, rhs: Complex) -> Complex
The method for the *
operator
impl<'a> Mul<&'a Complex> for Float
[src]
type Output = MulRefFloatOwn<'a>
The resulting type after applying the *
operator
fn mul(self, rhs: &'a Complex) -> MulRefFloatOwn<'a>
The method for the *
operator
impl<'a> Mul<&'a Complex> for &'a Float
[src]
type Output = MulRefFloat<'a>
The resulting type after applying the *
operator
fn mul(self, rhs: &'a Complex) -> MulRefFloat<'a>
The method for the *
operator
impl Div<Complex> for Float
[src]
type Output = Complex
The resulting type after applying the /
operator
fn div(self, rhs: Complex) -> Complex
The method for the /
operator
impl<'a> Div<Complex> for &'a Float
[src]
type Output = Complex
The resulting type after applying the /
operator
fn div(self, rhs: Complex) -> Complex
The method for the /
operator
impl<'a> Div<&'a Complex> for Float
[src]
type Output = DivFromRefFloatOwn<'a>
The resulting type after applying the /
operator
fn div(self, rhs: &'a Complex) -> DivFromRefFloatOwn<'a>
The method for the /
operator