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.
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);
Operations on two borrowed Float
numbers result in an
incomplete-computation value that has to be assigned
to a new Float
value.
use rug::Float; let a = Float::with_val(53, 10.5); let b = Float::with_val(53, -1.25); let a_b_ref = &a + &b; let a_b = Float::with_val(53, a_b_ref); assert_eq!(a_b, 9.25);
As a special case, when an
incomplete-computation value is obtained from
multiplying two Float
references, it can be added to or
subtracted from another Float
(or reference). This will result
in a fused multiply-accumulate operation, with only one rounding
operation taking place.
use rug::Float; // Use only 4 bits of precision for demonstration purposes. // 24 in binary is 11000. let a = Float::with_val(4, 24); // 1.5 in binary is 1.1. let mul1 = Float::with_val(4, 1.5); // -13 in binary is -1101. let mul2 = Float::with_val(4, -13); // 24 + 1.5 * -13 = 4.5 let add = Float::with_val(4, &a + &mul1 * &mul2); assert_eq!(add, 4.5); // 24 - 1.5 * -13 = 43.5, rounded to 44 using four bits of precision. let sub = a - &mul1 * &mul2; assert_eq!(sub, 44); // With separate addition and multiplication: let a = Float::with_val(4, 24); // No borrows, so multiplication is computed immediately. // 1.5 * -13 = -19.5 (binary -10011.1), rounded to -20. let separate_add = a + mul1 * mul2; assert_eq!(separate_add, 4);
The incomplete-computation value obtained from
multiplying two Float
references can also be added to or
subtracted from another such
incomplete-computation value, so that two
muliplications and an addition are fused with only one rounding
operation taking place.
use rug::Float; let a = Float::with_val(53, 24); let b = Float::with_val(53, 1.5); let c = Float::with_val(53, 12); let d = Float::with_val(53, 2); // 24 * 1.5 + 12 * 2 = 60 let add = Float::with_val(53, &a * &b + &c * &d); assert_eq!(add, 60); // 24 * 1.5 - 12 * 2 = 12 let sub = Float::with_val(53, &a * &b - &c * &d); assert_eq!(sub, 12);
The Float
type supports various functions. Most methods have
four versions:
- The first method consumes the operand and rounds the returned
Float
to the nearest representable value. - The second method has a
_mut
suffix, mutates the operand and rounds it the nearest representable value. - The third method has a
_round
suffix, mutates the operand, applies the specified rounding method, and returns the rounding direction:Ordering::Less
if the stored value is less than the exact result,Ordering::Equal
if the stored value is equal to the exact result,Ordering::Greater
if the stored value is greater than the exact result.
- The fourth method has a
_ref
suffix and borrows the operand. The returned item is an incomplete-computation value that can be assigned to aFloat
; the rounding method is selected during the assignment.
use rug::Float; use rug::float::Round; use std::cmp::Ordering; let expected = 0.9490_f64; // 1. consume the operand, round to nearest let a = Float::with_val(53, 1.25); let sin_a = a.sin(); assert!((sin_a - expected).abs() < 0.0001); // 2. mutate the operand, round to nearest let mut b = Float::with_val(53, 1.25); b.sin_mut(); assert!((b - expected).abs() < 0.0001); // 3. mutate the operand, apply specified rounding let mut c = Float::with_val(4, 1.25); // using 4 significant bits, 0.9490 is rounded down to 0.9375 let dir = c.sin_round(Round::Nearest); assert_eq!(c, 0.9375); assert_eq!(dir, Ordering::Less); // 4. borrow the operand let d = Float::with_val(53, 1.25); let r = d.sin_ref(); let sin_d = Float::with_val(53, r); assert!((sin_d - expected).abs() < 0.0001); // d was not consumed assert_eq!(d, 1.25);
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::Float; use rug::float::{Round}; use rug::ops::{AddAssignRound, AssignRound, 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) -> Self
[src]
Create a new Float
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) -> Self where
Float: Assign<T>,
[src]
Float: Assign<T>,
Create a new Float
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) -> (Self, Ordering) where
Self: AssignRound<T, Round = Round, Ordering = Ordering>,
[src]
Self: AssignRound<T, Round = Round, Ordering = Ordering>,
Create a new Float
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
[src]
fn set_prec(&mut self, prec: u32)
[src]
Sets the precision, rounding to the nearest.
Examples
use rug::Float; // 16.25 has seven significant bits (binary 10000.01) let mut f = Float::with_val(53, 16.25); f.set_prec(5); assert_eq!(f, 16); assert_eq!(f.prec(), 5);
Panics
Panics if prec
is out of the allowed range.
fn set_prec_round(&mut self, prec: u32, round: Round) -> Ordering
[src]
Sets the precision, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // 16.25 has seven significant bits (binary 10000.01) let mut f = Float::with_val(53, 16.25); let dir = f.set_prec_round(5, Round::Up); assert_eq!(f, 17); assert_eq!(dir, Ordering::Greater); assert_eq!(f.prec(), 5);
Panics
Panics if prec
is out of the allowed range.
fn parse<S: AsRef<[u8]>>(src: S) -> Result<ParseIncomplete, ParseFloatError>
[src]
Parses a decimal string or byte slice into a
Float
.
AssignRound<Src> for Float
is
implemented with the unwrapped returned object as Src
.
The string can start with an optional minus or plus sign and must then have one or more significant digits with an optional decimal point. This can optionally be followed by an exponent; the exponent can start with a separator 'e', 'E' or '@', and is followed by an optional minus or plus sign and by one or more decimal digits.
Alternatively, the string can indicate the special values
infinity or NaN. Infinity can be represented as "inf,
"infinity", "@inf@" or "@infinity@",and NaN can be represented
as "nan" or "@nan@". All of these special representations are
case insensitive. The NaN representation may also include a
possibly-empty string of ASCII letters, digits and underscores
enclosed in brackets, e.g. "nan(char_sequence_1)"
.
ASCII whitespace is ignored everywhere in the string except in the substrings specified above for special values; for example " @inf@ " is accepted but "@ inf @" is not. Underscores are ignored anywhere in digit strings except before the first digit and between the exponent separator and the first digit of the exponent.
Examples
use rug::Float; let valid = Float::parse("12.25e-4"); let f = Float::with_val(53, valid.unwrap()); assert_eq!(f, 12.25e-4); let invalid = Float::parse(".e-4"); assert!(invalid.is_err());
fn parse_radix<S: AsRef<[u8]>>(
src: S,
radix: i32
) -> Result<ParseIncomplete, ParseFloatError>
[src]
src: S,
radix: i32
) -> Result<ParseIncomplete, ParseFloatError>
Parses a string or byte slice into a
Float
.
AssignRound<Src> for Float
is
implemented with the unwrapped returned object as Src
.
The string can start with an optional minus or plus sign and must then have one or more significant digits with an optional point. This can optionally be followed by an exponent; the exponent can start with a separator 'e' or 'E' if the radix ≤ 10, or '@' for any radix, and is followed by an optional minus or plus sign and by one or more decimal digits.
Alternatively, the string can indicate the special values
infinity or NaN. If the radix ≤ 10, infinity can be
represented as "inf" or "infinity", and NaN can be represented
as "nan". For any radix, infinity can also be represented as
"@inf@" or "@infinity@", and NaN can be represented as
"@nan@". All of these special representations are case
insensitive. The NaN representation may also include a
possibly-empty string of ASCII letters, digits and underscores
enclosed in brackets, e.g. "nan(char_sequence_1)"
.
ASCII whitespace is ignored everywhere in the string except in the substrings specified above for special values; for example " @inf@ " is accepted but "@ inf @" is not. Underscores are ignored anywhere in digit strings except before the first digit and between the exponent separator and the first digit of the exponent.
Examples
use rug::Float; let valid1 = Float::parse_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::parse_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::parse_radix("ffe-2", 16); assert!(invalid.is_err());
Panics
Panics if radix
is less than 2 or greater than 36.
fn to_integer(&self) -> Option<Integer>
[src]
Converts to an Integer
, rounding to
the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 13.7); let i = match f.to_integer() { Some(i) => i, None => unreachable!(), }; assert_eq!(i, 14);
fn to_integer_round(&self, round: Round) -> Option<(Integer, Ordering)>
[src]
Converts to an Integer
, applying the
specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; let f = Float::with_val(53, 13.7); let (i, dir) = match f.to_integer_round(Round::Down) { Some(i_dir) => i_dir, None => unreachable!(), }; assert_eq!(i, 13); assert_eq!(dir, Ordering::Less);
fn to_integer_exp(&self) -> Option<(Integer, i32)>
[src]
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>
[src]
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 parse = Float::parse("0.0123456789").unwrap(); let (f, f_rounding) = Float::with_val_round(35, parse, Round::Down); 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>
[src]
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.
Examples
use rug::{Assign, Float}; use std::{i32, u32}; let mut f = Float::with_val(53, -13.7); assert_eq!(f.to_i32_saturating(), Some(-14)); f.assign(-1e40); assert_eq!(f.to_i32_saturating(), Some(i32::MIN)); f.assign(u32::MAX); assert_eq!(f.to_i32_saturating(), Some(i32::MAX));
fn to_i32_saturating_round(&self, round: Round) -> Option<i32>
[src]
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.
Examples
use rug::Float; use rug::float::Round; let f = Float::with_val(53, -13.7); assert_eq!(f.to_i32_saturating_round(Round::Up), Some(-13));
fn to_u32_saturating(&self) -> Option<u32>
[src]
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.
Examples
use rug::{Assign, Float}; use std::u32; let mut f = Float::with_val(53, 13.7); assert_eq!(f.to_u32_saturating(), Some(14)); f.assign(-1); assert_eq!(f.to_u32_saturating(), Some(0)); f.assign(1e40); assert_eq!(f.to_u32_saturating(), Some(u32::MAX));
fn to_u32_saturating_round(&self, round: Round) -> Option<u32>
[src]
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.
Examples
use rug::Float; use rug::float::Round; let f = Float::with_val(53, 13.7); assert_eq!(f.to_u32_saturating_round(Round::Down), Some(13));
fn to_f32(&self) -> f32
[src]
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.
Examples
use rug::{Assign, Float}; use std::f32; let mut f = Float::with_val(53, 13.7); assert_eq!(f.to_f32(), 13.7); f.assign(1e300); assert_eq!(f.to_f32(), f32::INFINITY); f.assign(1e-300); assert_eq!(f.to_f32(), 0.0);
fn to_f32_round(&self, round: Round) -> f32
[src]
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.
Examples
use rug::Float; use rug::float::Round; use std::f32; let f = Float::with_val(53, 1.0 + (-50f64).exp2()); assert_eq!(f.to_f32_round(Round::Up), 1.0 + f32::EPSILON);
fn to_f64(&self) -> f64
[src]
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.
Examples
use rug::{Assign, Float}; use std::f64; let mut f = Float::with_val(53, 13.7); assert_eq!(f.to_f64(), 13.7); f.assign(1e300); f.square_mut(); assert_eq!(f.to_f64(), f64::INFINITY);
fn to_f64_round(&self, round: Round) -> f64
[src]
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.
Examples
use rug::Float; use rug::float::Round; use std::f64; // (2.0 ^ -90) + 1 let f: Float = Float::with_val(100, -90).exp2() + 1; assert_eq!(f.to_f64_round(Round::Up), 1.0 + f64::EPSILON);
fn to_f32_exp(&self) -> (f32, i32)
[src]
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)
[src]
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)
[src]
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.
Examples
use rug::Float; let zero = Float::new(64); let (d0, exp0) = zero.to_f64_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_f64_exp(); assert_eq!((d3_8, exp3_8), (0.75, -1));
fn to_f64_exp_round(&self, round: Round) -> (f64, i32)
[src]
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.
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_f64_exp_round(Round::Down); assert_eq!((f_down, exp_down), (0.8333333333333333, 2)); let (f_up, exp_up) = frac_10_3.to_f64_exp_round(Round::Up); assert_eq!((f_up, exp_up), (0.8333333333333334, 2));
fn to_string_radix(&self, radix: i32, num_digits: Option<usize>) -> String
[src]
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::NegInfinity); 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
[src]
&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.
Examples
use rug::Float; use rug::float::Round; let twentythree = Float::with_val(8, 23.3); let down = twentythree.to_string_radix_round(10, Some(2), Round::Down); assert_eq!(down, "2.3e1"); let up = twentythree.to_string_radix_round(10, Some(2), Round::Up); assert_eq!(up, "2.4e1");
Panics
Panics if radix
is less than 2 or greater than 36.
unsafe fn from_raw(raw: mpfr_t) -> Self
[src]
Creates a Float
from an initialized
MPFR floating-point number.
Safety
- The value must be initialized.
- The
gmp_mpfr_sys::mpfr::mpfr_t
type can be considered as a kind of pointer, so there can be multiple copies of it. Since this function takes over ownership, no other copies of the passed value should exist.
Examples
extern crate gmp_mpfr_sys; extern crate rug; use gmp_mpfr_sys::mpfr; use rug::Float; use std::mem; fn main() { let f = unsafe { let mut m = mem::uninitialized(); mpfr::init2(&mut m, 53); mpfr::set_d(&mut m, -14.5, mpfr::rnd_t::RNDN); // m is initialized and unique Float::from_raw(m) }; assert_eq!(f, -14.5); // since f is a Float now, deallocation is automatic }
fn into_raw(self) -> mpfr_t
[src]
Converts a Float
into an MPFR
floating-point number.
The returned object should be freed to avoid memory leaks.
Examples
extern crate gmp_mpfr_sys; extern crate rug; use gmp_mpfr_sys::mpfr; use rug::Float; fn main() { let f = Float::with_val(53, -14.5); let mut m = f.into_raw(); unsafe { let d = mpfr::get_d(&m, mpfr::rnd_t::RNDN); assert_eq!(d, -14.5); // free object to prevent memory leak mpfr::clear(&mut m); } }
fn as_raw(&self) -> *const mpfr_t
[src]
Returns a pointer to the internal MPFR floating-point number.
The returned pointer will be valid for as long as self
is
valid.
Examples
extern crate gmp_mpfr_sys; extern crate rug; use gmp_mpfr_sys::mpfr; use rug::Float; fn main() { let f = Float::with_val(53, -14.5); let m_ptr = f.as_raw(); unsafe { let d = mpfr::get_d(m_ptr, mpfr::rnd_t::RNDN); assert_eq!(d, -14.5); } // f is still valid assert_eq!(f, -14.5); }
fn as_raw_mut(&mut self) -> *mut mpfr_t
[src]
Returns an unsafe mutable pointer to the internal MPFR floating-point number.
The returned pointer will be valid for as long as self
is
valid.
Examples
extern crate gmp_mpfr_sys; extern crate rug; use gmp_mpfr_sys::mpfr; use rug::Float; fn main() { let mut f = Float::with_val(53, -14.5); let m_ptr = f.as_raw_mut(); unsafe { mpfr::add_ui(m_ptr, m_ptr, 10, mpfr::rnd_t::RNDN); } assert_eq!(f, -4.5); }
fn as_neg(&self) -> BorrowFloat
[src]
Borrows a negated copy of the Float
.
The returned object implements Deref<Target = Float>
.
This method performs a shallow copy and negates it, and negation does not change the allocated data.
Examples
use rug::Float; let f = Float::with_val(53, 4.2); let neg_f = f.as_neg(); assert_eq!(*neg_f, -4.2); // methods taking &self can be used on the returned object let reneg_f = neg_f.as_neg(); assert_eq!(*reneg_f, 4.2); assert_eq!(*reneg_f, f);
fn as_abs(&self) -> BorrowFloat
[src]
Borrows an absolute copy of the Float
.
The returned object implements Deref<Target = Float>
.
This method performs a shallow copy and possibly negates it, and negation does not change the allocated data.
Examples
use rug::Float; let f = Float::with_val(53, -4.2); let abs_f = f.as_abs(); assert_eq!(*abs_f, 4.2); // methods taking &self can be used on the returned object let reabs_f = abs_f.as_abs(); assert_eq!(*reabs_f, 4.2); assert_eq!(*reabs_f, *abs_f);
fn as_ord(&self) -> &OrdFloat
[src]
Borrows the Float
as an ordered
floating-point number of type
OrdFloat
.
Examples
use rug::Float; use rug::float::Special; use std::cmp::Ordering; let nan_f = Float::with_val(53, Special::Nan); let nan = nan_f.as_ord(); assert_eq!(nan.cmp(nan), Ordering::Equal); let neg_inf_f = Float::with_val(53, Special::NegInfinity); let neg_inf = neg_inf_f.as_ord(); assert_eq!(nan.cmp(neg_inf), Ordering::Less); let zero_f = Float::with_val(53, Special::Zero); let zero = zero_f.as_ord(); let neg_zero_f = Float::with_val(53, Special::NegZero); let neg_zero = neg_zero_f.as_ord(); assert_eq!(zero.cmp(neg_zero), Ordering::Greater);
fn is_integer(&self) -> bool
[src]
Returns true
if self
is an integer.
Examples
use rug::Float; let mut f = Float::with_val(53, 13.5); assert!(!f.is_integer()); f *= 2; assert!(f.is_integer());
fn is_nan(&self) -> bool
[src]
Returns true
if self
is not a number.
Examples
use rug::Float; let mut f = Float::with_val(53, 0); assert!(!f.is_nan()); f /= 0; assert!(f.is_nan());
fn is_infinite(&self) -> bool
[src]
Returns true
if self
is plus or minus infinity.
Examples
use rug::Float; let mut f = Float::with_val(53, 1); assert!(!f.is_infinite()); f /= 0; assert!(f.is_infinite());
fn is_finite(&self) -> bool
[src]
Returns true
if self
is a finite number,
that is neither NaN nor infinity.
Examples
use rug::Float; let mut f = Float::with_val(53, 1); assert!(f.is_finite()); f /= 0; assert!(!f.is_finite());
fn is_zero(&self) -> bool
[src]
Returns true
if self
is plus or minus zero.
Examples
use rug::{Assign, Float}; use rug::float::Special; let mut f = Float::with_val(53, Special::Zero); assert!(f.is_zero()); f.assign(Special::NegZero); assert!(f.is_zero()); f += 1; assert!(!f.is_zero());
fn is_normal(&self) -> bool
[src]
Returns true
if self
is a normal number, that is neither
NaN, nor infinity, nor zero. Note that
Float
cannot be subnormal.
Examples
use rug::{Assign, Float}; use rug::float::Special; let mut f = Float::with_val(53, Special::Zero); assert!(!f.is_normal()); f += 5.2; assert!(f.is_normal()); f.assign(Special::Infinity); assert!(!f.is_normal()); f.assign(Special::Nan); assert!(!f.is_normal());
fn classify(&self) -> FpCategory
[src]
Returns the floating-point category of the number. Note that
Float
cannot be subnormal.
Examples
use rug::Float; use rug::float::Special; use std::num::FpCategory; let nan = Float::with_val(53, Special::Nan); let infinite = Float::with_val(53, Special::Infinity); let zero = Float::with_val(53, Special::Zero); let normal = Float::with_val(53, 2.3); assert_eq!(nan.classify(), FpCategory::Nan); assert_eq!(infinite.classify(), FpCategory::Infinite); assert_eq!(zero.classify(), FpCategory::Zero); assert_eq!(normal.classify(), FpCategory::Normal);
fn cmp0(&self) -> Option<Ordering>
[src]
Returns the same result as self.partial_cmp(&0)
, but is
faster.
Examples
use rug::{Assign, Float}; use rug::float::Special; use std::cmp::Ordering; let mut f = Float::with_val(53, Special::NegZero); assert_eq!(f.cmp0(), Some(Ordering::Equal)); f += 5.2; assert_eq!(f.cmp0(), Some(Ordering::Greater)); f.assign(Special::NegInfinity); assert_eq!(f.cmp0(), Some(Ordering::Less)); f.assign(Special::Nan); assert_eq!(f.cmp0(), None);
fn cmp_abs(&self, other: &Self) -> Option<Ordering>
[src]
Compares the absolute values of self
and other
.
Examples
use rug::Float; use std::cmp::Ordering; let a = Float::with_val(53, -10); let b = Float::with_val(53, 4); assert_eq!(a.partial_cmp(&b), Some(Ordering::Less)); assert_eq!(a.cmp_abs(&b), Some(Ordering::Greater));
fn get_exp(&self) -> Option<i32>
[src]
Returns the exponent of self
if self
is a normal number,
otherwise None
.
The significand is assumed to be in the range 0.5 ≤ x < 1.
Examples
use rug::{Assign, Float}; // -(2.0 ^ 32) == -(0.5 * 2 ^ 33) let mut f = Float::with_val(53, -32f64.exp2()); assert_eq!(f.get_exp(), Some(33)); // 0.8 * 2 ^ -39 f.assign(0.8 * (-39f64).exp2()); assert_eq!(f.get_exp(), Some(-39)); f.assign(0); assert_eq!(f.get_exp(), None);
fn is_sign_positive(&self) -> bool
[src]
Returns true
if the value is positive, +0 or NaN without a
negative sign.
Examples
use rug::Float; let pos = Float::with_val(53, 1.0); let neg = Float::with_val(53, -1.0); assert!(pos.is_sign_positive()); assert!(!neg.is_sign_positive());
fn is_sign_negative(&self) -> bool
[src]
Returns true
if the value is negative, −0 or NaN with a
negative sign.
Examples
use rug::Float; let neg = Float::with_val(53, -1.0); let pos = Float::with_val(53, 1.0); assert!(neg.is_sign_negative()); assert!(!pos.is_sign_negative());
fn next_toward(&mut self, to: &Self)
[src]
Sets to the next value towards to
.
Examples
use rug::Float; let to = Float::with_val(8, 100); // 32.5 in binary is 100000.10 // 32.75 in binary is 100000.11 let mut f = Float::with_val(8, 32.5); f.next_toward(&to); assert_eq!(f, 32.75);
fn next_up(&mut self)
[src]
Sets to the next value towards +∞.
Examples
use rug::Float; // 32.5 in binary is 100000.10 // 32.75 in binary is 100000.11 let mut f = Float::with_val(8, 32.5); f.next_up(); assert_eq!(f, 32.75);
fn next_down(&mut self)
[src]
Sets to the next value towards −∞.
Examples
use rug::Float; // 32.5 in binary is 100000.10 // 32.25 in binary is 100000.01 let mut f = Float::with_val(8, 32.5); f.next_down(); assert_eq!(f, 32.25);
fn subnormalize_ieee(&mut self) -> &mut Self
[src]
Emulate subnormal numbers for precisions specified in IEEE 754, rounding to the nearest.
Subnormalization is only performed for precisions specified in IEEE 754:
- binary16 with 16 storage bits and a precision of 11 bits,
- binary32 (single precision) with 32 storage bits and a precision of 24 bits,
- binary64 (double precision) with 64 storage bits and a precision of 53 bits,
- binary{k} with k storage bits where k is a multiple of 32 and k ≥ 128, and a precision of k − round(4 × log2 k) + 13 bits.
This method has no effect if the value is not in the subnormal range.
Examples
use rug::Float; use std::f32; // minimum single subnormal is 0.5 * 2 ^ -148 = 2 ^ -149 let single_min_subnormal = (-149f64).exp2(); assert_eq!(single_min_subnormal, single_min_subnormal as f32 as f64); let single_cannot = single_min_subnormal * 1.25; assert_eq!(single_min_subnormal, single_cannot as f32 as f64); let mut f = Float::with_val(24, single_cannot); assert_eq!(f.to_f64(), single_cannot); f.subnormalize_ieee(); assert_eq!(f.to_f64(), single_min_subnormal);
fn subnormalize_ieee_round(
&mut self,
prev_rounding: Ordering,
round: Round
) -> Ordering
[src]
&mut self,
prev_rounding: Ordering,
round: Round
) -> Ordering
Emulate subnormal numbers for precisions specified in IEEE 754, applying the specified rounding method.
Subnormalization is only performed for precisions specified in IEEE 754:
- binary16 with 16 storage bits and a precision of 11 bits,
- binary32 (single precision) with 32 storage bits and a precision of 24 bits,
- binary64 (double precision) with 64 storage bits and a precision of 53 bits,
- binary{k} with k storage bits where k is a multiple of 32 and k ≥ 128, and a precision of k − round(4 × log2 k) + 13 bits.
This method simply propagates prev_rounding
if the value is
not in the subnormal range.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; use std::f32; // minimum single subnormal is 0.5 * 2 ^ -148 = 2 ^ -149 let single_min_subnormal = (-149f64).exp2(); assert_eq!(single_min_subnormal, single_min_subnormal as f32 as f64); let single_cannot = single_min_subnormal * 1.25; assert_eq!(single_min_subnormal, single_cannot as f32 as f64); let mut f = Float::with_val(24, single_cannot); assert_eq!(f.to_f64(), single_cannot); let dir = f.subnormalize_ieee_round(Ordering::Equal, Round::Up); assert_eq!(f.to_f64(), single_min_subnormal * 2.0); assert_eq!(dir, Ordering::Greater);
fn subnormalize(&mut self, normal_exp_min: i32) -> &mut Self
[src]
Emulate subnormal numbers, rounding to the nearest.
Subnormalization is only performed when the exponent lies
within the subnormal range, that is when
normal_exp_min
− precision + 1 ≤ exponent < normal_exp_min
.
For example, for IEEE 754 single precision, the precision is
24 and normal_exp_min
is −125, so the subnormal range would
be −148 ≤ exponent < −125.
This method has no effect if the value is not in the subnormal range.
Examples
use rug::Float; use std::f32; // minimum single subnormal is 0.5 * 2 ^ -148 = 2 ^ -149 let single_min_subnormal = (-149f64).exp2(); assert_eq!(single_min_subnormal, single_min_subnormal as f32 as f64); let single_cannot = single_min_subnormal * 1.25; assert_eq!(single_min_subnormal, single_cannot as f32 as f64); let mut f = Float::with_val(24, single_cannot); assert_eq!(f.to_f64(), single_cannot); f.subnormalize(-125); assert_eq!(f.to_f64(), single_min_subnormal);
fn subnormalize_round(
&mut self,
normal_exp_min: i32,
prev_rounding: Ordering,
round: Round
) -> Ordering
[src]
&mut self,
normal_exp_min: i32,
prev_rounding: Ordering,
round: Round
) -> Ordering
Emulate subnormal numbers, applying the specified rounding method.
Subnormalization is only performed when the exponent lies
within the subnormal range, that is when
normal_exp_min
− precision + 1 ≤ exponent < normal_exp_min
.
For example, for IEEE 754 single precision, the precision is
24 and normal_exp_min
is −125, so the subnormal range would
be −148 ≤ exponent < −125.
This method simply propagates prev_rounding
if the value is
not in the subnormal range.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; use std::f32; // minimum single subnormal is 0.5 * 2 ^ -148 = 2 ^ -149 let single_min_subnormal = (-149f64).exp2(); assert_eq!(single_min_subnormal, single_min_subnormal as f32 as f64); let single_cannot = single_min_subnormal * 1.25; assert_eq!(single_min_subnormal, single_cannot as f32 as f64); let mut f = Float::with_val(24, single_cannot); assert_eq!(f.to_f64(), single_cannot); let dir = f.subnormalize_round(-125, Ordering::Equal, Round::Up); assert_eq!(f.to_f64(), single_min_subnormal * 2.0); assert_eq!(dir, Ordering::Greater);
fn sum<'a, I>(values: I) -> SumIncomplete<'a, I> where
I: Iterator<Item = &'a Self>,
[src]
I: Iterator<Item = &'a Self>,
Adds a list of Float
values with
correct rounding.
AssignRound<Src> for Float
,
Add<Src> for Float
, AddAssign<Src> for Float
and
AddAssignRound<Src> for Float
,
are implemented with the returned object as Src
.
Examples
use rug::Float; use rug::float::Round; use rug::ops::AddAssignRound; use std::cmp::Ordering; // Give each value only 4 bits of precision for example purposes. let values = [ Float::with_val(4, 5.0), Float::with_val(4, 1024.0), Float::with_val(4, -1024.0), Float::with_val(4, -4.5), ]; // The result should still be exact if it fits. let r = Float::sum(values.iter()); let sum = Float::with_val(4, r); assert_eq!(sum, 0.5); let mut f = Float::with_val(4, 15.0); // 15.5 using 4 bits of precision becomes 16.0 let r = Float::sum(values.iter()); let dir = f.add_assign_round(r, Round::Nearest); assert_eq!(f, 16.0); assert_eq!(dir, Ordering::Greater);
fn mul_add(self, mul: &Self, add: &Self) -> Self
[src]
Multiplies and adds in one fused operation, rounding to the nearest with only one rounding error.
a.mul_add(&b, &c)
produces a result like &a * &b + &c
, but
a
is consumed and the result produced uses its precision.
Examples
use rug::Float; // Use only 4 bits of precision for demonstration purposes. // 1.5 in binary is 1.1. let mul1 = Float::with_val(4, 1.5); // -13 in binary is -1101. let mul2 = Float::with_val(4, -13); // 24 in binary is 11000. let add = Float::with_val(4, 24); // 1.5 * -13 + 24 = 4.5 let mul_add = mul1.mul_add(&mul2, &add); assert_eq!(mul_add, 4.5);
fn mul_add_mut(&mut self, mul: &Self, add: &Self)
[src]
Multiplies and adds in one fused operation, rounding to the nearest with only one rounding error.
a.mul_add_mut(&b, &c)
produces a result like &a * &b + &c
,
but stores the result in a
using its precision.
Examples
use rug::Float; // Use only 4 bits of precision for demonstration purposes. // 1.5 in binary is 1.1. let mut mul1 = Float::with_val(4, 1.5); // -13 in binary is -1101. let mul2 = Float::with_val(4, -13); // 24 in binary is 11000. let add = Float::with_val(4, 24); // 1.5 * -13 + 24 = 4.5 mul1.mul_add_mut(&mul2, &add); assert_eq!(mul1, 4.5);
fn mul_add_round(&mut self, mul: &Self, add: &Self, round: Round) -> Ordering
[src]
Multiplies and adds in one fused operation, applying the specified rounding method with only one rounding error.
a.mul_add_round(&b, &c, round)
produces a result like
ans.assign_round(&a * &b + &c, round)
, but stores the result
in a
using its precision rather than in another
Float
like ans
.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision for demonstration purposes. // 1.5 in binary is 1.1. let mut mul1 = Float::with_val(4, 1.5); // -13 in binary is -1101. let mul2 = Float::with_val(4, -13); // 24 in binary is 11000. let add = Float::with_val(4, 24); // 1.5 * -13 + 24 = 4.5 let dir = mul1.mul_add_round(&mul2, &add, Round::Nearest); assert_eq!(mul1, 4.5); assert_eq!(dir, Ordering::Equal);
fn mul_add_ref<'a>(
&'a self,
mul: &'a Self,
add: &'a Self
) -> AddMulIncomplete<'a>
[src]
&'a self,
mul: &'a Self,
add: &'a Self
) -> AddMulIncomplete<'a>
Multiplies and adds in one fused operation.
AssignRound<Src> for Float
is
implemented with the returned object as Src
.
a.mul_add_ref(&b, &c)
produces the exact same result as
&a * &b + &c
.
Examples
use rug::Float; // Use only 4 bits of precision for demonstration purposes. // 1.5 in binary is 1.1. let mul1 = Float::with_val(4, 1.5); // -13 in binary is -1101. let mul2 = Float::with_val(4, -13); // 24 in binary is 11000. let add = Float::with_val(4, 24); // 1.5 * -13 + 24 = 4.5 let ans = Float::with_val(4, mul1.mul_add_ref(&mul2, &add)); assert_eq!(ans, 4.5);
fn mul_sub(self, mul: &Self, sub: &Self) -> Self
[src]
Multiplies and subtracts in one fused operation, rounding to the nearest with only one rounding error.
a.mul_sub(&b, &c)
produces a result like &a * &b - &c
, but
a
is consumed and the result produced uses its precision.
Examples
use rug::Float; // Use only 4 bits of precision for demonstration purposes. // 1.5 in binary is 1.1. let mul1 = Float::with_val(4, 1.5); // -13 in binary is -1101. let mul2 = Float::with_val(4, -13); // 24 in binary is 11000. let sub = Float::with_val(4, 24); // 1.5 * -13 - 24 = -43.5, rounded to 44 using four bits of precision. let mul_sub = mul1.mul_sub(&mul2, &sub); assert_eq!(mul_sub, -44);
fn mul_sub_mut(&mut self, mul: &Self, sub: &Self)
[src]
Multiplies and subtracts in one fused operation, rounding to the nearest with only one rounding error.
a.mul_sub_mut(&b, &c)
produces a result like &a * &b - &c
,
but stores the result in a
using its precision.
Examples
use rug::Float; // Use only 4 bits of precision for demonstration purposes. // 1.5 in binary is 1.1. let mut mul1 = Float::with_val(4, 1.5); // -13 in binary is -1101. let mul2 = Float::with_val(4, -13); // 24 in binary is 11000. let sub = Float::with_val(4, 24); // 1.5 * -13 - 24 = -43.5, rounded to 44 using four bits of precision. mul1.mul_sub_mut(&mul2, &sub); assert_eq!(mul1, -44);
fn mul_sub_round(&mut self, mul: &Self, sub: &Self, round: Round) -> Ordering
[src]
Multiplies and subtracts in one fused operation, applying the specified rounding method with only one rounding error.
a.mul_sub_round(&b, &c, round)
produces a result like
ans.assign_round(&a * &b - &c, round)
, but stores the result
in a
using its precision rather than in another
Float
like ans
.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision for demonstration purposes. // 1.5 in binary is 1.1. let mut mul1 = Float::with_val(4, 1.5); // -13 in binary is -1101. let mul2 = Float::with_val(4, -13); // 24 in binary is 11000. let sub = Float::with_val(4, 24); // 1.5 * -13 - 24 = -43.5, rounded to 44 using four bits of precision. let dir = mul1.mul_sub_round(&mul2, &sub, Round::Nearest); assert_eq!(mul1, -44); assert_eq!(dir, Ordering::Less);
fn mul_sub_ref<'a>(
&'a self,
mul: &'a Self,
sub: &'a Self
) -> SubMulFromIncomplete<'a>
[src]
&'a self,
mul: &'a Self,
sub: &'a Self
) -> SubMulFromIncomplete<'a>
Multiplies and subtracts in one fused operation.
AssignRound<Src> for Float
is
implemented with the returned object as Src
.
a.mul_sub_ref(&b, &c)
produces the exact same result as
&a * &b - &c
.
Examples
use rug::Float; // Use only 4 bits of precision for demonstration purposes. // 1.5 in binary is 1.1. let mul1 = Float::with_val(4, 1.5); // -13 in binary is -1101. let mul2 = Float::with_val(4, -13); // 24 in binary is 11000. let sub = Float::with_val(4, 24); // 1.5 * -13 - 24 = -43.5, rounded to 44 using four bits of precision. let ans = Float::with_val(4, mul1.mul_sub_ref(&mul2, &sub)); assert_eq!(ans, -44);
fn mul_add_mul(self, mul: &Self, add_mul1: &Self, add_mul2: &Self) -> Self
[src]
Multiplies two products and adds them in one fused operation, rounding to the nearest with only one rounding error.
a.mul_add_mul(&b, &c, &d)
produces a result like
&a * &b + &c * &d
, but a
is consumed and the result
produced uses its precision.
Examples
use rug::Float; let a = Float::with_val(53, 24); let b = Float::with_val(53, 1.5); let c = Float::with_val(53, 12); let d = Float::with_val(53, 2); // 24 * 1.5 + 12 * 2 = 60 let mul_add_mul = a.mul_add_mul(&b, &c, &d); assert_eq!(mul_add_mul, 60);
fn mul_add_mul_mut(&mut self, mul: &Self, add_mul1: &Self, add_mul2: &Self)
[src]
Multiplies two products and adds them in one fused operation, rounding to the nearest with only one rounding error.
a.mul_add_mul_mut(&b, &c, &d)
produces a result like
&a * &b + &c * &d
, but stores the result in a
using its
precision.
Examples
use rug::Float; let mut a = Float::with_val(53, 24); let b = Float::with_val(53, 1.5); let c = Float::with_val(53, 12); let d = Float::with_val(53, 2); // 24 * 1.5 + 12 * 2 = 60 a.mul_add_mul_mut(&b, &c, &d); assert_eq!(a, 60);
fn mul_add_mul_round(
&mut self,
mul: &Self,
add_mul1: &Self,
add_mul2: &Self,
round: Round
) -> Ordering
[src]
&mut self,
mul: &Self,
add_mul1: &Self,
add_mul2: &Self,
round: Round
) -> Ordering
Multiplies two produces and adds them in one fused operation, applying the specified rounding method with only one rounding error.
a.mul_add_mul_round(&b, &c, &d, round)
produces a result
like ans.assign_round(&a * &b + &c * &d, round)
, but stores
the result in a
using its precision rather than in another
Float
like ans
.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; let mut a = Float::with_val(53, 24); let b = Float::with_val(53, 1.5); let c = Float::with_val(53, 12); let d = Float::with_val(53, 2); // 24 * 1.5 + 12 * 2 = 60 let dir = a.mul_add_mul_round(&b, &c, &d, Round::Nearest); assert_eq!(a, 60); assert_eq!(dir, Ordering::Equal);
fn mul_add_mul_ref<'a>(
&'a self,
mul: &'a Self,
add_mul1: &'a Self,
add_mul2: &'a Self
) -> MulAddMulIncomplete<'a>
[src]
&'a self,
mul: &'a Self,
add_mul1: &'a Self,
add_mul2: &'a Self
) -> MulAddMulIncomplete<'a>
Multiplies two products and adds them in one fused operation.
AssignRound<Src> for Float
is
implemented with the returned object as Src
.
a.mul_add_mul_ref(&b, &c, &d)
produces the exact same result
as &a * &b + &c * &d
.
Examples
use rug::Float; let a = Float::with_val(53, 24); let b = Float::with_val(53, 1.5); let c = Float::with_val(53, 12); let d = Float::with_val(53, 2); // 24 * 1.5 + 12 * 2 = 60 let ans = Float::with_val(53, a.mul_add_mul_ref(&b, &c, &d)); assert_eq!(ans, 60);
fn mul_sub_mul(self, mul: &Self, sub_mul1: &Self, sub_mul2: &Self) -> Self
[src]
Multiplies two products and subtracts them in one fused operation, rounding to the nearest with only one rounding error.
a.mul_sub_mul(&b, &c, &d)
produces a result like
&a * &b - &c * &d
, but a
is consumed and the result
produced uses its precision.
Examples
use rug::Float; let a = Float::with_val(53, 24); let b = Float::with_val(53, 1.5); let c = Float::with_val(53, 12); let d = Float::with_val(53, 2); // 24 * 1.5 - 12 * 2 = 12 let mul_sub_mul = a.mul_sub_mul(&b, &c, &d); assert_eq!(mul_sub_mul, 12);
fn mul_sub_mul_mut(&mut self, mul: &Self, sub_mul1: &Self, sub_mul2: &Self)
[src]
Multiplies two products and subtracts them in one fused operation, rounding to the nearest with only one rounding error.
a.mul_sub_mul_mut(&b, &c, &d)
produces a result like
&a * &b - &c * &d
, but stores the result in a
using its
precision.
Examples
use rug::Float; let mut a = Float::with_val(53, 24); let b = Float::with_val(53, 1.5); let c = Float::with_val(53, 12); let d = Float::with_val(53, 2); // 24 * 1.5 - 12 * 2 = 12 a.mul_sub_mul_mut(&b, &c, &d); assert_eq!(a, 12);
fn mul_sub_mul_round(
&mut self,
mul: &Self,
sub_mul1: &Self,
sub_mul2: &Self,
round: Round
) -> Ordering
[src]
&mut self,
mul: &Self,
sub_mul1: &Self,
sub_mul2: &Self,
round: Round
) -> Ordering
Multiplies two produces and subtracts them in one fused operation, applying the specified rounding method with only one rounding error.
a.mul_sub_mul_round(&b, &c, &d, round)
produces a result
like ans.assign_round(&a * &b - &c * &d, round)
, but stores
the result in a
using its precision rather than in another
Float
like ans
.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; let mut a = Float::with_val(53, 24); let b = Float::with_val(53, 1.5); let c = Float::with_val(53, 12); let d = Float::with_val(53, 2); // 24 * 1.5 - 12 * 2 = 12 let dir = a.mul_sub_mul_round(&b, &c, &d, Round::Nearest); assert_eq!(a, 12); assert_eq!(dir, Ordering::Equal);
fn mul_sub_mul_ref<'a>(
&'a self,
mul: &'a Self,
sub_mul1: &'a Self,
sub_mul2: &'a Self
) -> MulSubMulIncomplete<'a>
[src]
&'a self,
mul: &'a Self,
sub_mul1: &'a Self,
sub_mul2: &'a Self
) -> MulSubMulIncomplete<'a>
Multiplies two products and subtracts them in one fused operation.
AssignRound<Src> for Float
is
implemented with the returned object as Src
.
a.mul_sub_mul_ref(&b, &c, &d)
produces the exact same result
as &a * &b - &c * &d
.
Examples
use rug::Float; let a = Float::with_val(53, 24); let b = Float::with_val(53, 1.5); let c = Float::with_val(53, 12); let d = Float::with_val(53, 2); // 24 * 1.5 - 12 * 2 = 12 let ans = Float::with_val(53, a.mul_sub_mul_ref(&b, &c, &d)); assert_eq!(ans, 12);
fn square(self) -> Self
[src]
Computes the square, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 5.0); let square = f.square(); assert_eq!(square, 25.0);
fn square_mut(&mut self)
[src]
Computes the square, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 5.0); f.square_mut(); assert_eq!(f, 25.0);
fn square_round(&mut self, round: Round) -> Ordering
[src]
Computes the square, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // 5 in binary is 101 let mut f = Float::with_val(3, 5.0); // 25 in binary is 11001 (more than 3 bits of precision). // 25 (11001) is rounded up to 28 (11100). let dir = f.square_round(Round::Up); assert_eq!(f, 28.0); assert_eq!(dir, Ordering::Greater);
fn square_ref(&self) -> SquareIncomplete
[src]
Computes the square.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 5.0); let r = f.square_ref(); let square = Float::with_val(53, r); assert_eq!(square, 25.0);
fn sqrt(self) -> Self
[src]
Computes the square root, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 25.0); let sqrt = f.sqrt(); assert_eq!(sqrt, 5.0);
fn sqrt_mut(&mut self)
[src]
Computes the square root, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 25.0); f.sqrt_mut(); assert_eq!(f, 5.0);
fn sqrt_round(&mut self, round: Round) -> Ordering
[src]
Computes the square root, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // 5 in binary is 101 let mut f = Float::with_val(4, 5.0); // sqrt(5) in binary is 10.00111100... // sqrt(5) is rounded to 2.25 (10.01). let dir = f.sqrt_round(Round::Nearest); assert_eq!(f, 2.25); assert_eq!(dir, Ordering::Greater);
fn sqrt_ref(&self) -> SqrtIncomplete
[src]
Computes the square root.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 25.0); let r = f.sqrt_ref(); let sqrt = Float::with_val(53, r); assert_eq!(sqrt, 5.0);
fn sqrt_u(u: u32) -> SqrtUIncomplete
[src]
Computes the square root of u
.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let s = Float::sqrt_u(25); let f = Float::with_val(53, s); assert_eq!(f, 5.0);
fn recip_sqrt(self) -> Self
[src]
Computes the reciprocal square root, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 16.0); let recip_sqrt = f.recip_sqrt(); assert_eq!(recip_sqrt, 0.25);
fn recip_sqrt_mut(&mut self)
[src]
Computes the reciprocal square root, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 16.0); f.recip_sqrt_mut(); assert_eq!(f, 0.25);
fn recip_sqrt_round(&mut self, round: Round) -> Ordering
[src]
Computes the reciprocal square root, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // 5 in binary is 101 let mut f = Float::with_val(4, 5.0); // 1/sqrt(5) in binary is 0.01110010... // 1/sqrt(5) is rounded to 0.4375 (0.01110). let dir = f.recip_sqrt_round(Round::Nearest); assert_eq!(f, 0.4375); assert_eq!(dir, Ordering::Less);
fn recip_sqrt_ref(&self) -> RecipSqrtIncomplete
[src]
Computes the reciprocal square root.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 16.0); let r = f.recip_sqrt_ref(); let recip_sqrt = Float::with_val(53, r); assert_eq!(recip_sqrt, 0.25);
fn cbrt(self) -> Self
[src]
Computes the cube root, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 125.0); let cbrt = f.cbrt(); assert_eq!(cbrt, 5.0);
fn cbrt_mut(&mut self)
[src]
Computes the cube root, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 125.0); f.cbrt_mut(); assert_eq!(f, 5.0);
fn cbrt_round(&mut self, round: Round) -> Ordering
[src]
Computes the cube root, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // 5 in binary is 101 let mut f = Float::with_val(4, 5.0); // cbrt(5) in binary is 1.101101... // cbrt(5) is rounded to 1.75 (1.110). let dir = f.cbrt_round(Round::Nearest); assert_eq!(f, 1.75); assert_eq!(dir, Ordering::Greater);
fn cbrt_ref(&self) -> CbrtIncomplete
[src]
Computes the cube root.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 125.0); let r = f.cbrt_ref(); let cbrt = Float::with_val(53, r); assert_eq!(cbrt, 5.0);
fn root(self, k: u32) -> Self
[src]
Computes the kth root, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 625.0); let root = f.root(4); assert_eq!(root, 5.0);
fn root_mut(&mut self, k: u32)
[src]
Computes the kth root, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 625.0); f.root_mut(4); assert_eq!(f, 5.0);
fn root_round(&mut self, k: u32, round: Round) -> Ordering
[src]
Computes the kth root, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // 5 in binary is 101 let mut f = Float::with_val(4, 5.0); // fourth root of 5 in binary is 1.01111... // fourth root of 5 is rounded to 1.5 (1.100). let dir = f.root_round(4, Round::Nearest); assert_eq!(f, 1.5); assert_eq!(dir, Ordering::Greater);
fn root_ref(&self, k: u32) -> RootIncomplete
[src]
Computes the kth root.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 625.0); let r = f.root_ref(4); let root = Float::with_val(53, r); assert_eq!(root, 5.0);
fn abs(self) -> Self
[src]
Computes the absolute value.
Examples
use rug::Float; let f = Float::with_val(53, -23.5); let abs = f.abs(); assert_eq!(abs, 23.5);
fn abs_mut(&mut self)
[src]
Computes the absolute value.
Examples
use rug::Float; let mut f = Float::with_val(53, -23.5); f.abs_mut(); assert_eq!(f, 23.5);
fn abs_ref(&self) -> AbsIncomplete
[src]
Computes the absolute value.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, -23.5); let r = f.abs_ref(); let abs = Float::with_val(53, r); assert_eq!(abs, 23.5);
fn signum(self) -> Self
[src]
Computes the signum.
- 1.0 if the value is positive, +0.0 or +∞
- −1.0 if the value is negative, −0.0 or −∞
- NaN if the value is NaN
Examples
use rug::Float; assert_eq!(Float::with_val(53, -23.5).signum(), -1); assert_eq!(Float::with_val(53, -0.0).signum(), -1); assert_eq!(Float::with_val(53, 0.0).signum(), 1); assert_eq!(Float::with_val(53, 23.5).signum(), 1);
fn signum_mut(&mut self)
[src]
Computes the signum.
- 1.0 if the value is positive, +0.0 or +∞
- −1.0 if the value is negative, −0.0 or −∞
- NaN if the value is NaN
Examples
use rug::Float; let mut f = Float::with_val(53, -23.5); f.signum_mut(); assert_eq!(f, -1);
fn signum_ref(&self) -> SignumIncomplete
[src]
Computes the signum.
- 1.0 if the value is positive, +0.0 or +∞
- −1.0 if the value is negative, −0.0 or −∞
- NaN if the value is NaN
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, -23.5); let r = f.signum_ref(); let signum = Float::with_val(53, r); assert_eq!(signum, -1);
fn clamp<'a, 'b, Min, Max>(self, min: &'a Min, max: &'b Max) -> Self where
Self: PartialOrd<Min> + PartialOrd<Max> + AssignRound<&'a Min, Round = Round, Ordering = Ordering> + AssignRound<&'b Max, Round = Round, Ordering = Ordering>,
[src]
Self: PartialOrd<Min> + PartialOrd<Max> + AssignRound<&'a Min, Round = Round, Ordering = Ordering> + AssignRound<&'b Max, Round = Round, Ordering = Ordering>,
Clamps the value within the specified bounds, rounding to the nearest.
Examples
use rug::Float; let min = -1.5; let max = 1.5; let too_small = Float::with_val(53, -2.5); let clamped1 = too_small.clamp(&min, &max); assert_eq!(clamped1, -1.5); let in_range = Float::with_val(53, 0.5); let clamped2 = in_range.clamp(&min, &max); assert_eq!(clamped2, 0.5);
Panics
Panics if the maximum value is less than the minimum value,
unless assigning any of them to self
produces the same value
with the same rounding direction.
fn clamp_mut<'a, 'b, Min, Max>(&mut self, min: &'a Min, max: &'b Max) where
Self: PartialOrd<Min> + PartialOrd<Max> + AssignRound<&'a Min, Round = Round, Ordering = Ordering> + AssignRound<&'b Max, Round = Round, Ordering = Ordering>,
[src]
Self: PartialOrd<Min> + PartialOrd<Max> + AssignRound<&'a Min, Round = Round, Ordering = Ordering> + AssignRound<&'b Max, Round = Round, Ordering = Ordering>,
Clamps the value within the specified bounds, rounding to the nearest.
Examples
use rug::Float; let min = -1.5; let max = 1.5; let mut too_small = Float::with_val(53, -2.5); too_small.clamp_mut(&min, &max); assert_eq!(too_small, -1.5); let mut in_range = Float::with_val(53, 0.5); in_range.clamp_mut(&min, &max); assert_eq!(in_range, 0.5);
Panics
Panics if the maximum value is less than the minimum value,
unless assigning any of them to self
produces the same value
with the same rounding direction.
fn clamp_round<'a, 'b, Min, Max>(
&mut self,
min: &'a Min,
max: &'b Max,
round: Round
) -> Ordering where
Self: PartialOrd<Min> + PartialOrd<Max> + AssignRound<&'a Min, Round = Round, Ordering = Ordering> + AssignRound<&'b Max, Round = Round, Ordering = Ordering>,
[src]
&mut self,
min: &'a Min,
max: &'b Max,
round: Round
) -> Ordering where
Self: PartialOrd<Min> + PartialOrd<Max> + AssignRound<&'a Min, Round = Round, Ordering = Ordering> + AssignRound<&'b Max, Round = Round, Ordering = Ordering>,
Clamps the value within the specified bounds, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; let min = Float::with_val(53, -1.5); let max = Float::with_val(53, 1.5); let mut too_small = Float::with_val(53, -2.5); let dir1 = too_small.clamp_round(&min, &max, Round::Nearest); assert_eq!(too_small, -1.5); assert_eq!(dir1, Ordering::Equal); let mut in_range = Float::with_val(53, 0.5); let dir2 = in_range.clamp_round(&min, &max, Round::Nearest); assert_eq!(in_range, 0.5); assert_eq!(dir2, Ordering::Equal);
Panics
Panics if the maximum value is less than the minimum value,
unless assigning any of them to self
produces the same value
with the same rounding direction.
fn clamp_ref<'a, Min, Max>(
&'a self,
min: &'a Min,
max: &'a Max
) -> ClampIncomplete<'a, Min, Max> where
Self: PartialOrd<Min> + PartialOrd<Max> + AssignRound<&'a Min, Round = Round, Ordering = Ordering> + AssignRound<&'a Max, Round = Round, Ordering = Ordering>,
[src]
&'a self,
min: &'a Min,
max: &'a Max
) -> ClampIncomplete<'a, Min, Max> where
Self: PartialOrd<Min> + PartialOrd<Max> + AssignRound<&'a Min, Round = Round, Ordering = Ordering> + AssignRound<&'a Max, Round = Round, Ordering = Ordering>,
Clamps the value within the specified bounds.
AssignRound<Src> for Float
is
implemented with the returned object as Src
.
Examples
use rug::Float; let min = -1.5; let max = 1.5; let too_small = Float::with_val(53, -2.5); let r1 = too_small.clamp_ref(&min, &max); let clamped1 = Float::with_val(53, r1); assert_eq!(clamped1, -1.5); let in_range = Float::with_val(53, 0.5); let r2 = in_range.clamp_ref(&min, &max); let clamped2 = Float::with_val(53, r2); assert_eq!(clamped2, 0.5);
Panics
Panics if the maximum value is less than the minimum value, unless assigning any of them to the target produces the same value with the same rounding direction.
fn recip(self) -> Self
[src]
Computes the reciprocal, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, -0.25); let recip = f.recip(); assert_eq!(recip, -4.0);
fn recip_mut(&mut self)
[src]
Computes the reciprocal, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, -0.25); f.recip_mut(); assert_eq!(f, -4.0);
fn recip_round(&mut self, round: Round) -> Ordering
[src]
Computes the reciprocal, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // 5 in binary is 101 let mut f = Float::with_val(4, -5.0); // 1/5 in binary is 0.00110011... // 1/5 is rounded to 0.203125 (0.001101). let dir = f.recip_round(Round::Nearest); assert_eq!(f, -0.203125); assert_eq!(dir, Ordering::Less);
fn recip_ref(&self) -> RecipIncomplete
[src]
Computes the reciprocal.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, -0.25); let r = f.recip_ref(); let recip = Float::with_val(53, r); assert_eq!(recip, -4.0);
fn min(self, other: &Self) -> Self
[src]
Finds the minimum, rounding to the nearest.
Examples
use rug::Float; let a = Float::with_val(53, 5.2); let b = Float::with_val(53, -2); let min = a.min(&b); assert_eq!(min, -2);
fn min_mut(&mut self, other: &Self)
[src]
Finds the minimum, rounding to the nearest.
Examples
use rug::Float; let mut a = Float::with_val(53, 5.2); let b = Float::with_val(53, -2); a.min_mut(&b); assert_eq!(a, -2);
fn min_round(&mut self, other: &Self, round: Round) -> Ordering
[src]
Finds the minimum, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; let mut a = Float::with_val(53, 5.2); let b = Float::with_val(53, -2); let dir = a.min_round(&b, Round::Nearest); assert_eq!(a, -2); assert_eq!(dir, Ordering::Equal);
fn min_ref<'a>(&'a self, other: &'a Self) -> MinIncomplete<'a>
[src]
Finds the minimum.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let a = Float::with_val(53, 5.2); let b = Float::with_val(53, -2); let r = a.min_ref(&b); let min = Float::with_val(53, r); assert_eq!(min, -2);
fn max(self, other: &Self) -> Self
[src]
Finds the maximum, rounding to the nearest.
Examples
use rug::Float; let a = Float::with_val(53, 5.2); let b = Float::with_val(53, 12.5); let max = a.max(&b); assert_eq!(max, 12.5);
fn max_mut(&mut self, other: &Self)
[src]
Finds the maximum, rounding to the nearest.
Examples
use rug::Float; let mut a = Float::with_val(53, 5.2); let b = Float::with_val(53, 12.5); a.max_mut(&b); assert_eq!(a, 12.5);
fn max_round(&mut self, other: &Self, round: Round) -> Ordering
[src]
Finds the maximum, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; let mut a = Float::with_val(53, 5.2); let b = Float::with_val(53, 12.5); let dir = a.max_round(&b, Round::Nearest); assert_eq!(a, 12.5); assert_eq!(dir, Ordering::Equal);
fn max_ref<'a>(&'a self, other: &'a Self) -> MaxIncomplete<'a>
[src]
Finds the maximum.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let a = Float::with_val(53, 5.2); let b = Float::with_val(53, 12.5); let r = a.max_ref(&b); let max = Float::with_val(53, r); assert_eq!(max, 12.5);
fn positive_diff(self, other: &Self) -> Self
[src]
Computes the positive difference between self
and
other
, rounding to the nearest.
The positive difference is self
− other
if self
>
other
, zero if self
≤ other
, or NaN if any operand
is NaN.
Examples
use rug::Float; let a = Float::with_val(53, 12.5); let b = Float::with_val(53, 7.3); let diff1 = a.positive_diff(&b); assert_eq!(diff1, 5.2); let diff2 = diff1.positive_diff(&b); assert_eq!(diff2, 0);
fn positive_diff_mut(&mut self, other: &Self)
[src]
Computes the positive difference between self
and
other
, rounding to the nearest.
The positive difference is self
− other
if self
>
other
, zero if self
≤ other
, or NaN if any operand
is NaN.
Examples
use rug::Float; let mut a = Float::with_val(53, 12.5); let b = Float::with_val(53, 7.3); a.positive_diff_mut(&b); assert_eq!(a, 5.2); a.positive_diff_mut(&b); assert_eq!(a, 0);
fn positive_diff_round(&mut self, other: &Self, round: Round) -> Ordering
[src]
Computes the positive difference between self
and
other
, applying the specified rounding method.
The positive difference is self
− other
if self
>
other
, zero if self
≤ other
, or NaN if any operand
is NaN.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; let mut a = Float::with_val(53, 12.5); let b = Float::with_val(53, 7.3); let dir = a.positive_diff_round(&b, Round::Nearest); assert_eq!(a, 5.2); assert_eq!(dir, Ordering::Equal); let dir = a.positive_diff_round(&b, Round::Nearest); assert_eq!(a, 0); assert_eq!(dir, Ordering::Equal);
fn positive_diff_ref<'a>(
&'a self,
other: &'a Self
) -> PositiveDiffIncomplete<'a>
[src]
&'a self,
other: &'a Self
) -> PositiveDiffIncomplete<'a>
Computes the positive difference.
The positive difference is self
− other
if self
>
other
, zero if self
≤ other
, or NaN if any operand
is NaN.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let a = Float::with_val(53, 12.5); let b = Float::with_val(53, 7.3); let rab = a.positive_diff_ref(&b); let ab = Float::with_val(53, rab); assert_eq!(ab, 5.2); let rba = b.positive_diff_ref(&a); let ba = Float::with_val(53, rba); assert_eq!(ba, 0);
fn ln(self) -> Self
[src]
Computes the natural logarithm, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.5); let ln = f.ln(); let expected = 0.4055_f64; assert!((ln - expected).abs() < 0.0001);
fn ln_mut(&mut self)
[src]
Computes the natural logarithm, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.5); f.ln_mut(); let expected = 0.4055_f64; assert!((f - expected).abs() < 0.0001);
fn ln_round(&mut self, round: Round) -> Ordering
[src]
Computes the natural logarithm, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.5); // ln(1.5) = 0.4055 // using 4 significant bits: 0.40625 let dir = f.ln_round(Round::Nearest); assert_eq!(f, 0.40625); assert_eq!(dir, Ordering::Greater);
fn ln_ref(&self) -> LnIncomplete
[src]
Computes the natural logarithm.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.5); let ln = Float::with_val(53, f.ln_ref()); let expected = 0.4055_f64; assert!((ln - expected).abs() < 0.0001);
fn ln_u(u: u32) -> LnUIncomplete
[src]
Computes the natural logarithm of u
.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let l = Float::ln_u(3); let f = Float::with_val(53, l); let expected = 1.0986f64; assert!((f - expected).abs() < 0.0001);
fn log2(self) -> Self
[src]
Computes the logarithm to base 2, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.5); let log2 = f.log2(); let expected = 0.5850_f64; assert!((log2 - expected).abs() < 0.0001);
fn log2_mut(&mut self)
[src]
Computes the logarithm to base 2, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.5); f.log2_mut(); let expected = 0.5850_f64; assert!((f - expected).abs() < 0.0001);
fn log2_round(&mut self, round: Round) -> Ordering
[src]
Computes the logarithm to base 2, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.5); // log2(1.5) = 0.5850 // using 4 significant bits: 0.5625 let dir = f.log2_round(Round::Nearest); assert_eq!(f, 0.5625); assert_eq!(dir, Ordering::Less);
fn log2_ref(&self) -> Log2Incomplete
[src]
Computes the logarithm to base 2.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.5); let log2 = Float::with_val(53, f.log2_ref()); let expected = 0.5850_f64; assert!((log2 - expected).abs() < 0.0001);
fn log10(self) -> Self
[src]
Computes the logarithm to base 10, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.5); let log10 = f.log10(); let expected = 0.1761_f64; assert!((log10 - expected).abs() < 0.0001);
fn log10_mut(&mut self)
[src]
Computes the logarithm to base 10, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.5); f.log10_mut(); let expected = 0.1761_f64; assert!((f - expected).abs() < 0.0001);
fn log10_round(&mut self, round: Round) -> Ordering
[src]
Computes the logarithm to base 10, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.5); // log10(1.5) = 0.1761 // using 4 significant bits: 0.171875 let dir = f.log10_round(Round::Nearest); assert_eq!(f, 0.171875); assert_eq!(dir, Ordering::Less);
fn log10_ref(&self) -> Log10Incomplete
[src]
Computes the logarithm to base 10.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.5); let log10 = Float::with_val(53, f.log10_ref()); let expected = 0.1761_f64; assert!((log10 - expected).abs() < 0.0001);
fn exp(self) -> Self
[src]
Computes the exponential, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.5); let exp = f.exp(); let expected = 4.4817_f64; assert!((exp - expected).abs() < 0.0001);
fn exp_mut(&mut self)
[src]
Computes the exponential, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.5); f.exp_mut(); let expected = 4.4817_f64; assert!((f - expected).abs() < 0.0001);
fn exp_round(&mut self, round: Round) -> Ordering
[src]
Computes the exponential, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.5); // exp(1.5) = 4.4817 // using 4 significant bits: 4.5 let dir = f.exp_round(Round::Nearest); assert_eq!(f, 4.5); assert_eq!(dir, Ordering::Greater);
fn exp_ref(&self) -> ExpIncomplete
[src]
Computes the exponential.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.5); let exp = Float::with_val(53, f.exp_ref()); let expected = 4.4817_f64; assert!((exp - expected).abs() < 0.0001);
fn exp2(self) -> Self
[src]
Computes 2 to the power of self
, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.5); let exp2 = f.exp2(); let expected = 2.8284_f64; assert!((exp2 - expected).abs() < 0.0001);
fn exp2_mut(&mut self)
[src]
Computes 2 to the power of self
, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.5); f.exp2_mut(); let expected = 2.8284_f64; assert!((f - expected).abs() < 0.0001);
fn exp2_round(&mut self, round: Round) -> Ordering
[src]
Computes 2 to the power of self
, applying the specified
rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.5); // exp2(1.5) = 2.8284 // using 4 significant bits: 2.75 let dir = f.exp2_round(Round::Nearest); assert_eq!(f, 2.75); assert_eq!(dir, Ordering::Less);
fn exp2_ref(&self) -> Exp2Incomplete
[src]
Computes 2 to the power of the value.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.5); let exp2 = Float::with_val(53, f.exp2_ref()); let expected = 2.8284_f64; assert!((exp2 - expected).abs() < 0.0001);
fn exp10(self) -> Self
[src]
Computes 10 to the power of self
, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.5); let exp10 = f.exp10(); let expected = 31.6228_f64; assert!((exp10 - expected).abs() < 0.0001);
fn exp10_mut(&mut self)
[src]
Computes 10 to the power of self
, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.5); f.exp10_mut(); let expected = 31.6228_f64; assert!((f - expected).abs() < 0.0001);
fn exp10_round(&mut self, round: Round) -> Ordering
[src]
Computes 10 to the power of self
, applying the specified
rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.5); // exp10(1.5) = 31.6228 // using 4 significant bits: 32 let dir = f.exp10_round(Round::Nearest); assert_eq!(f, 32); assert_eq!(dir, Ordering::Greater);
fn exp10_ref(&self) -> Exp10Incomplete
[src]
Computes 10 to the power of the value.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.5); let exp10 = Float::with_val(53, f.exp10_ref()); let expected = 31.6228_f64; assert!((exp10 - expected).abs() < 0.0001);
fn sin(self) -> Self
[src]
Computes the sine, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let sin = f.sin(); let expected = 0.9490_f64; assert!((sin - expected).abs() < 0.0001);
fn sin_mut(&mut self)
[src]
Computes the sine, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.25); f.sin_mut(); let expected = 0.9490_f64; assert!((f - expected).abs() < 0.0001);
fn sin_round(&mut self, round: Round) -> Ordering
[src]
Computes the sine, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.25); // sin(1.25) = 0.9490 // using 4 significant bits: 0.9375 let dir = f.sin_round(Round::Nearest); assert_eq!(f, 0.9375); assert_eq!(dir, Ordering::Less);
fn sin_ref(&self) -> SinIncomplete
[src]
Computes the sine.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let sin = Float::with_val(53, f.sin_ref()); let expected = 0.9490_f64; assert!((sin - expected).abs() < 0.0001);
fn cos(self) -> Self
[src]
Computes the cosine, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let cos = f.cos(); let expected = 0.3153_f64; assert!((cos - expected).abs() < 0.0001);
fn cos_mut(&mut self)
[src]
Computes the cosine, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.25); f.cos_mut(); let expected = 0.3153_f64; assert!((f - expected).abs() < 0.0001);
fn cos_round(&mut self, round: Round) -> Ordering
[src]
Computes the cosine, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.25); // cos(1.25) = 0.3153 // using 4 significant bits: 0.3125 let dir = f.cos_round(Round::Nearest); assert_eq!(f, 0.3125); assert_eq!(dir, Ordering::Less);
fn cos_ref(&self) -> CosIncomplete
[src]
Computes the cosine.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let cos = Float::with_val(53, f.cos_ref()); let expected = 0.3153_f64; assert!((cos - expected).abs() < 0.0001);
fn tan(self) -> Self
[src]
Computes the tangent, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let tan = f.tan(); let expected = 3.0096_f64; assert!((tan - expected).abs() < 0.0001);
fn tan_mut(&mut self)
[src]
Computes the tangent, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.25); f.tan_mut(); let expected = 3.0096_f64; assert!((f - expected).abs() < 0.0001);
fn tan_round(&mut self, round: Round) -> Ordering
[src]
Computes the tangent, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.25); // tan(1.25) = 3.0096 // using 4 significant bits: 3.0 let dir = f.tan_round(Round::Nearest); assert_eq!(f, 3.0); assert_eq!(dir, Ordering::Less);
fn tan_ref(&self) -> TanIncomplete
[src]
Computes the tangent.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let tan = Float::with_val(53, f.tan_ref()); let expected = 3.0096_f64; assert!((tan - expected).abs() < 0.0001);
fn sin_cos(self, cos: Self) -> (Self, Self)
[src]
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.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let (sin, cos) = f.sin_cos(Float::new(53)); let expected_sin = 0.9490_f64; let expected_cos = 0.3153_f64; assert!((sin - expected_sin).abs() < 0.0001); assert!((cos - expected_cos).abs() < 0.0001);
fn sin_cos_mut(&mut self, cos: &mut Self)
[src]
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.
Examples
use rug::Float; let mut sin = Float::with_val(53, 1.25); let mut cos = Float::new(53); sin.sin_cos_mut(&mut cos); let expected_sin = 0.9490_f64; let expected_cos = 0.3153_f64; assert!((sin - expected_sin).abs() < 0.0001); assert!((cos - expected_cos).abs() < 0.0001);
fn sin_cos_round(
&mut self,
cos: &mut Self,
round: Round
) -> (Ordering, Ordering)
[src]
&mut self,
cos: &mut Self,
round: Round
) -> (Ordering, Ordering)
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.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut sin = Float::with_val(4, 1.25); let mut cos = Float::new(4); // sin(1.25) = 0.9490, using 4 significant bits: 0.9375 // cos(1.25) = 0.3153, using 4 significant bits: 0.3125 let (dir_sin, dir_cos) = sin.sin_cos_round(&mut cos, Round::Nearest); assert_eq!(sin, 0.9375); assert_eq!(dir_sin, Ordering::Less); assert_eq!(cos, 0.3125); assert_eq!(dir_cos, Ordering::Less);
fn sin_cos_ref(&self) -> SinCosIncomplete
[src]
Computes the sine and cosine.
AssignRound<Src> for (Float, Float)
and
AssignRound<Src> for (&mut Float, &mut Float)
are
implemented with the returned object as Src
.
Examples
use rug::{Assign, Float}; use rug::float::Round; use rug::ops::AssignRound; use std::cmp::Ordering; let phase = Float::with_val(53, 1.25); let (mut sin, mut cos) = (Float::new(53), Float::new(53)); let sin_cos = phase.sin_cos_ref(); (&mut sin, &mut cos).assign(sin_cos); let expected_sin = 0.9490_f64; let expected_cos = 0.3153_f64; assert!((sin - expected_sin).abs() < 0.0001); assert!((cos - expected_cos).abs() < 0.0001); // using 4 significant bits: sin = 0.9375 // using 4 significant bits: cos = 0.3125 let (mut sin_4, mut cos_4) = (Float::new(4), Float::new(4)); let sin_cos = phase.sin_cos_ref(); let (dir_sin, dir_cos) = (&mut sin_4, &mut cos_4) .assign_round(sin_cos, Round::Nearest); assert_eq!(sin_4, 0.9375); assert_eq!(dir_sin, Ordering::Less); assert_eq!(cos_4, 0.3125); assert_eq!(dir_cos, Ordering::Less);
fn sec(self) -> Self
[src]
Computes the secant, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let sec = f.sec(); let expected = 3.1714_f64; assert!((sec - expected).abs() < 0.0001);
fn sec_mut(&mut self)
[src]
Computes the secant, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.25); f.sec_mut(); let expected = 3.1714_f64; assert!((f - expected).abs() < 0.0001);
fn sec_round(&mut self, round: Round) -> Ordering
[src]
Computes the secant, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.25); // sec(1.25) = 3.1714 // using 4 significant bits: 3.25 let dir = f.sec_round(Round::Nearest); assert_eq!(f, 3.25); assert_eq!(dir, Ordering::Greater);
fn sec_ref(&self) -> SecIncomplete
[src]
Computes the secant.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let sec = Float::with_val(53, f.sec_ref()); let expected = 3.1714_f64; assert!((sec - expected).abs() < 0.0001);
fn csc(self) -> Self
[src]
Computes the cosecant, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let csc = f.csc(); let expected = 1.0538_f64; assert!((csc - expected).abs() < 0.0001);
fn csc_mut(&mut self)
[src]
Computes the cosecant, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.25); f.csc_mut(); let expected = 1.0538_f64; assert!((f - expected).abs() < 0.0001);
fn csc_round(&mut self, round: Round) -> Ordering
[src]
Computes the cosecant, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.25); // csc(1.25) = 1.0538 // using 4 significant bits: 1.0 let dir = f.csc_round(Round::Nearest); assert_eq!(f, 1.0); assert_eq!(dir, Ordering::Less);
fn csc_ref(&self) -> CscIncomplete
[src]
Computes the cosecant.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let csc = Float::with_val(53, f.csc_ref()); let expected = 1.0538_f64; assert!((csc - expected).abs() < 0.0001);
fn cot(self) -> Self
[src]
Computes the cotangent, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let cot = f.cot(); let expected = 0.3323_f64; assert!((cot - expected).abs() < 0.0001);
fn cot_mut(&mut self)
[src]
Computes the cotangent, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.25); f.cot_mut(); let expected = 0.3323_f64; assert!((f - expected).abs() < 0.0001);
fn cot_round(&mut self, round: Round) -> Ordering
[src]
Computes the cotangent, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.25); // cot(1.25) = 0.3323 // using 4 significant bits: 0.34375 let dir = f.cot_round(Round::Nearest); assert_eq!(f, 0.34375); assert_eq!(dir, Ordering::Greater);
fn cot_ref(&self) -> CotIncomplete
[src]
Computes the cotangent.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let cot = Float::with_val(53, f.cot_ref()); let expected = 0.3323_f64; assert!((cot - expected).abs() < 0.0001);
fn asin(self) -> Self
[src]
Computes the arc-sine, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, -0.75); let asin = f.asin(); let expected = -0.8481_f64; assert!((asin - expected).abs() < 0.0001);
fn asin_mut(&mut self)
[src]
Computes the arc-sine, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, -0.75); f.asin_mut(); let expected = -0.8481_f64; assert!((f - expected).abs() < 0.0001);
fn asin_round(&mut self, round: Round) -> Ordering
[src]
Computes the arc-sine, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, -0.75); // asin(-0.75) = -0.8481 // using 4 significant bits: -0.875 let dir = f.asin_round(Round::Nearest); assert_eq!(f, -0.875); assert_eq!(dir, Ordering::Less);
fn asin_ref(&self) -> AsinIncomplete
[src]
Computes the arc-sine.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, -0.75); let asin = Float::with_val(53, f.asin_ref()); let expected = -0.8481_f64; assert!((asin - expected).abs() < 0.0001);
fn acos(self) -> Self
[src]
Computes the arc-cosine, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, -0.75); let acos = f.acos(); let expected = 2.4189_f64; assert!((acos - expected).abs() < 0.0001);
fn acos_mut(&mut self)
[src]
Computes the arc-cosine, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, -0.75); f.acos_mut(); let expected = 2.4189_f64; assert!((f - expected).abs() < 0.0001);
fn acos_round(&mut self, round: Round) -> Ordering
[src]
Computes the arc-cosine, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, -0.75); // acos(-0.75) = 2.4189 // using 4 significant bits: 2.5 let dir = f.acos_round(Round::Nearest); assert_eq!(f, 2.5); assert_eq!(dir, Ordering::Greater);
fn acos_ref(&self) -> AcosIncomplete
[src]
Computes the arc-cosine.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, -0.75); let acos = Float::with_val(53, f.acos_ref()); let expected = 2.4189_f64; assert!((acos - expected).abs() < 0.0001);
fn atan(self) -> Self
[src]
Computes the arc-tangent, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, -0.75); let atan = f.atan(); let expected = -0.6435_f64; assert!((atan - expected).abs() < 0.0001);
fn atan_mut(&mut self)
[src]
Computes the arc-tangent, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, -0.75); f.atan_mut(); let expected = -0.6435_f64; assert!((f - expected).abs() < 0.0001);
fn atan_round(&mut self, round: Round) -> Ordering
[src]
Computes the arc-tangent, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, -0.75); // atan(-0.75) = -0.6435 // using 4 significant bits: -0.625 let dir = f.atan_round(Round::Nearest); assert_eq!(f, -0.625); assert_eq!(dir, Ordering::Greater);
fn atan_ref(&self) -> AtanIncomplete
[src]
Computes the arc-tangent.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, -0.75); let atan = Float::with_val(53, f.atan_ref()); let expected = -0.6435_f64; assert!((atan - expected).abs() < 0.0001);
fn atan2(self, x: &Self) -> Self
[src]
Computes the arc-tangent2 of self
and x
, rounding to
the nearest.
This is similar to the arc-tangent of self / x
, but
has an output range of 2π rather than π.
Examples
use rug::Float; let y = Float::with_val(53, 3.0); let x = Float::with_val(53, -4.0); let atan2 = y.atan2(&x); let expected = 2.4981_f64; assert!((atan2 - expected).abs() < 0.0001);
fn atan2_mut(&mut self, x: &Self)
[src]
Computes the arc-tangent2 of self
and x
, rounding to
the nearest.
This is similar to the arc-tangent of self / x
, but
has an output range of 2π rather than π.
Examples
use rug::Float; let mut y = Float::with_val(53, 3.0); let x = Float::with_val(53, -4.0); y.atan2_mut(&x); let expected = 2.4981_f64; assert!((y - expected).abs() < 0.0001);
fn atan2_round(&mut self, x: &Self, round: Round) -> Ordering
[src]
Computes the arc-tangent2 of self
and x
, applying the
specified rounding method.
This is similar to the arc-tangent of self / x
, but
has an output range of 2π rather than π.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut y = Float::with_val(4, 3.0); let x = Float::with_val(4, -4.0); // atan2(3.0, -4.0) = 2.4981 // using 4 significant bits: 2.5 let dir = y.atan2_round(&x, Round::Nearest); assert_eq!(y, 2.5); assert_eq!(dir, Ordering::Greater);
fn atan2_ref<'a>(&'a self, x: &'a Self) -> Atan2Incomplete<'a>
[src]
Computes the arc-tangent.
This is similar to the arc-tangent of self / x
, but
has an output range of 2π rather than π.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let y = Float::with_val(53, 3.0); let x = Float::with_val(53, -4.0); let r = y.atan2_ref(&x); let atan2 = Float::with_val(53, r); let expected = 2.4981_f64; assert!((atan2 - expected).abs() < 0.0001);
fn sinh(self) -> Self
[src]
Computes the hyperbolic sine, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let sinh = f.sinh(); let expected = 1.6019_f64; assert!((sinh - expected).abs() < 0.0001);
fn sinh_mut(&mut self)
[src]
Computes the hyperbolic sine, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.25); f.sinh_mut(); let expected = 1.6019_f64; assert!((f - expected).abs() < 0.0001);
fn sinh_round(&mut self, round: Round) -> Ordering
[src]
Computes the hyperbolic sine, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.25); // sinh(1.25) = 1.6019 // using 4 significant bits: 1.625 let dir = f.sinh_round(Round::Nearest); assert_eq!(f, 1.625); assert_eq!(dir, Ordering::Greater);
fn sinh_ref(&self) -> SinhIncomplete
[src]
Computes the hyperbolic sine.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let sinh = Float::with_val(53, f.sinh_ref()); let expected = 1.6019_f64; assert!((sinh - expected).abs() < 0.0001);
fn cosh(self) -> Self
[src]
Computes the hyperbolic cosine, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let cosh = f.cosh(); let expected = 1.8884_f64; assert!((cosh - expected).abs() < 0.0001);
fn cosh_mut(&mut self)
[src]
Computes the hyperbolic cosine, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.25); f.cosh_mut(); let expected = 1.8884_f64; assert!((f - expected).abs() < 0.0001);
fn cosh_round(&mut self, round: Round) -> Ordering
[src]
Computes the hyperbolic cosine, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.25); // cosh(1.25) = 1.8884 // using 4 significant bits: 1.875 let dir = f.cosh_round(Round::Nearest); assert_eq!(f, 1.875); assert_eq!(dir, Ordering::Less);
fn cosh_ref(&self) -> CoshIncomplete
[src]
Computes the hyperbolic cosine.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let cosh = Float::with_val(53, f.cosh_ref()); let expected = 1.8884_f64; assert!((cosh - expected).abs() < 0.0001);
fn tanh(self) -> Self
[src]
Computes the hyperbolic tangent, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let tanh = f.tanh(); let expected = 0.8483_f64; assert!((tanh - expected).abs() < 0.0001);
fn tanh_mut(&mut self)
[src]
Computes the hyperbolic tangent, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.25); f.tanh_mut(); let expected = 0.8483_f64; assert!((f - expected).abs() < 0.0001);
fn tanh_round(&mut self, round: Round) -> Ordering
[src]
Computes the hyperbolic tangent, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.25); // tanh(1.25) = 0.8483 // using 4 significant bits: 0.875 let dir = f.tanh_round(Round::Nearest); assert_eq!(f, 0.875); assert_eq!(dir, Ordering::Greater);
fn tanh_ref(&self) -> TanhIncomplete
[src]
Computes the hyperbolic tangent.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let tanh = Float::with_val(53, f.tanh_ref()); let expected = 0.8483_f64; assert!((tanh - expected).abs() < 0.0001);
fn sinh_cosh(self, cos: Self) -> (Self, Self)
[src]
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.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let (sinh, cosh) = f.sinh_cosh(Float::new(53)); let expected_sinh = 1.6019_f64; let expected_cosh = 1.8884_f64; assert!((sinh - expected_sinh).abs() < 0.0001); assert!((cosh - expected_cosh).abs() < 0.0001);
fn sinh_cosh_mut(&mut self, cos: &mut Self)
[src]
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.
Examples
use rug::Float; let mut sinh = Float::with_val(53, 1.25); let mut cosh = Float::new(53); sinh.sinh_cosh_mut(&mut cosh); let expected_sinh = 1.6019_f64; let expected_cosh = 1.8884_f64; assert!((sinh - expected_sinh).abs() < 0.0001); assert!((cosh - expected_cosh).abs() < 0.0001);
fn sinh_cosh_round(
&mut self,
cos: &mut Self,
round: Round
) -> (Ordering, Ordering)
[src]
&mut self,
cos: &mut Self,
round: Round
) -> (Ordering, Ordering)
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.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut sinh = Float::with_val(4, 1.25); let mut cosh = Float::new(4); // sinh(1.25) = 1.6019, using 4 significant bits: 1.625 // cosh(1.25) = 1.8884, using 4 significant bits: 1.875 let (dir_sinh, dir_cosh) = sinh.sinh_cosh_round(&mut cosh, Round::Nearest); assert_eq!(sinh, 1.625); assert_eq!(dir_sinh, Ordering::Greater); assert_eq!(cosh, 1.875); assert_eq!(dir_cosh, Ordering::Less);
fn sinh_cosh_ref(&self) -> SinhCoshIncomplete
[src]
Computes the hyperbolic sine and cosine.
AssignRound<Src> for (Float, Float)
and
[AssignRound<Src> for (&mut Float, &mut Float)
ar are
implemented with the returned object as Src
.
Examples
use rug::{Assign, Float}; use rug::float::Round; use rug::ops::AssignRound; use std::cmp::Ordering; let phase = Float::with_val(53, 1.25); let (mut sinh, mut cosh) = (Float::new(53), Float::new(53)); let sinh_cosh = phase.sinh_cosh_ref(); (&mut sinh, &mut cosh).assign(sinh_cosh); let expected_sinh = 1.6019_f64; let expected_cosh = 1.8884_f64; assert!((sinh - expected_sinh).abs() < 0.0001); assert!((cosh - expected_cosh).abs() < 0.0001); // using 4 significant bits: sin = 1.625 // using 4 significant bits: cos = 1.875 let (mut sinh_4, mut cosh_4) = (Float::new(4), Float::new(4)); let sinh_cosh = phase.sinh_cosh_ref(); let (dir_sinh, dir_cosh) = (&mut sinh_4, &mut cosh_4) .assign_round(sinh_cosh, Round::Nearest); assert_eq!(sinh_4, 1.625); assert_eq!(dir_sinh, Ordering::Greater); assert_eq!(cosh_4, 1.875); assert_eq!(dir_cosh, Ordering::Less);
fn sech(self) -> Self
[src]
Computes the hyperbolic secant, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let sech = f.sech(); let expected = 0.5295_f64; assert!((sech - expected).abs() < 0.0001);
fn sech_mut(&mut self)
[src]
Computes the hyperbolic secant, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.25); f.sech_mut(); let expected = 0.5295_f64; assert!((f - expected).abs() < 0.0001);
fn sech_round(&mut self, round: Round) -> Ordering
[src]
Computes the hyperbolic secant, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.25); // sech(1.25) = 0.5295 // using 4 significant bits: 0.5 let dir = f.sech_round(Round::Nearest); assert_eq!(f, 0.5); assert_eq!(dir, Ordering::Less);
fn sech_ref(&self) -> SechIncomplete
[src]
Computes the hyperbolic secant.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let sech = Float::with_val(53, f.sech_ref()); let expected = 0.5295_f64; assert!((sech - expected).abs() < 0.0001);
fn csch(self) -> Self
[src]
Computes the hyperbolic cosecant, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let csch = f.csch(); let expected = 0.6243_f64; assert!((csch - expected).abs() < 0.0001);
fn csch_mut(&mut self)
[src]
Computes the hyperbolic cosecant, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.25); f.csch_mut(); let expected = 0.6243_f64; assert!((f - expected).abs() < 0.0001);
fn csch_round(&mut self, round: Round) -> Ordering
[src]
Computes the hyperbolic cosecant, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.25); // csch(1.25) = 0.6243 // using 4 significant bits: 0.625 let dir = f.csch_round(Round::Nearest); assert_eq!(f, 0.625); assert_eq!(dir, Ordering::Greater);
fn csch_ref(&self) -> CschIncomplete
[src]
Computes the hyperbolic cosecant.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let csch = Float::with_val(53, f.csch_ref()); let expected = 0.6243_f64; assert!((csch - expected).abs() < 0.0001);
fn coth(self) -> Self
[src]
Computes the hyperbolic cotangent, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let coth = f.coth(); let expected = 1.1789_f64; assert!((coth - expected).abs() < 0.0001);
fn coth_mut(&mut self)
[src]
Computes the hyperbolic cotangent, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.25); f.coth_mut(); let expected = 1.1789_f64; assert!((f - expected).abs() < 0.0001);
fn coth_round(&mut self, round: Round) -> Ordering
[src]
Computes the hyperbolic cotangent, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.25); // coth(1.25) = 1.1789 // using 4 significant bits: 1.125 let dir = f.coth_round(Round::Nearest); assert_eq!(f, 1.125); assert_eq!(dir, Ordering::Less);
fn coth_ref(&self) -> CothIncomplete
[src]
Computes the hyperbolic cotangent.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let coth = Float::with_val(53, f.coth_ref()); let expected = 1.1789_f64; assert!((coth - expected).abs() < 0.0001);
fn asinh(self) -> Self
[src]
Computes the inverse hyperbolic sine, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let asinh = f.asinh(); let expected = 1.0476_f64; assert!((asinh - expected).abs() < 0.0001);
fn asinh_mut(&mut self)
[src]
Computes the inverse hyperbolic sine, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.25); f.asinh_mut(); let expected = 1.0476_f64; assert!((f - expected).abs() < 0.0001);
fn asinh_round(&mut self, round: Round) -> Ordering
[src]
Computes the inverse hyperbolic sine, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.25); // asinh(1.25) = 1.0476 // using 4 significant bits: 1.0 let dir = f.asinh_round(Round::Nearest); assert_eq!(f, 1.0); assert_eq!(dir, Ordering::Less);
fn asinh_ref(&self) -> AsinhIncomplete
[src]
Computes the inverse hyperbolic sine.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let asinh = Float::with_val(53, f.asinh_ref()); let expected = 1.0476_f64; assert!((asinh - expected).abs() < 0.0001);
fn acosh(self) -> Self
[src]
Computes the inverse hyperbolic cosine, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let acosh = f.acosh(); let expected = 0.6931_f64; assert!((acosh - expected).abs() < 0.0001);
fn acosh_mut(&mut self)
[src]
Computes the inverse hyperbolic cosine, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.25); f.acosh_mut(); let expected = 0.6931_f64; assert!((f - expected).abs() < 0.0001);
fn acosh_round(&mut self, round: Round) -> Ordering
[src]
Computes the inverse hyperbolic cosine, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.25); // acosh(1.25) = 0.6931 // using 4 significant bits: 0.6875 let dir = f.acosh_round(Round::Nearest); assert_eq!(f, 0.6875); assert_eq!(dir, Ordering::Less);
fn acosh_ref(&self) -> AcoshIncomplete
[src]
Computes the inverse hyperbolic cosine
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let acosh = Float::with_val(53, f.acosh_ref()); let expected = 0.6931_f64; assert!((acosh - expected).abs() < 0.0001);
fn atanh(self) -> Self
[src]
Computes the inverse hyperbolic tangent, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 0.75); let atanh = f.atanh(); let expected = 0.9730_f64; assert!((atanh - expected).abs() < 0.0001);
fn atanh_mut(&mut self)
[src]
Computes the inverse hyperbolic tangent, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 0.75); f.atanh_mut(); let expected = 0.9730_f64; assert!((f - expected).abs() < 0.0001);
fn atanh_round(&mut self, round: Round) -> Ordering
[src]
Computes the inverse hyperbolic tangent, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 0.75); // atanh(0.75) = 0.9730 // using 4 significant bits: 1.0 let dir = f.atanh_round(Round::Nearest); assert_eq!(f, 1.0); assert_eq!(dir, Ordering::Greater);
fn atanh_ref(&self) -> AtanhIncomplete
[src]
Computes the inverse hyperbolic tangent.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 0.75); let atanh = Float::with_val(53, f.atanh_ref()); let expected = 0.9730_f64; assert!((atanh - expected).abs() < 0.0001);
fn factorial(n: u32) -> FactorialIncomplete
[src]
Computes the factorial of n.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; // 10 * 9 * 8 * 7 * 6 * 5 * 4 * 3 * 2 * 1 let n = Float::factorial(10); let f = Float::with_val(53, n); assert_eq!(f, 3628800.0);
fn ln_1p(self) -> Self
[src]
Computes the natural logarithm of one plus self
, rounding to
the nearest.
Examples
use rug::Float; let two_to_m10 = (-10f64).exp2(); let f = Float::with_val(53, 1.5 * two_to_m10); let ln_1p = f.ln_1p(); let expected = 1.4989_f64 * two_to_m10; assert!((ln_1p - expected).abs() < 0.0001 * two_to_m10);
fn ln_1p_mut(&mut self)
[src]
Computes the natural logarithm of one plus self
, rounding to
the nearest.
Examples
use rug::Float; let two_to_m10 = (-10f64).exp2(); let mut f = Float::with_val(53, 1.5 * two_to_m10); f.ln_1p_mut(); let expected = 1.4989_f64 * two_to_m10; assert!((f - expected).abs() < 0.0001 * two_to_m10);
fn ln_1p_round(&mut self, round: Round) -> Ordering
[src]
Computes the natural logarithm of one plus self
, applying
the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; let two_to_m10 = (-10f64).exp2(); // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.5 * two_to_m10); // ln_1p(1.5 * 2 ^ -10) = 1.4989 * 2 ^ -10 // using 4 significant bits: 1.5 * 2 ^ -10 let dir = f.ln_1p_round(Round::Nearest); assert_eq!(f, 1.5 * two_to_m10); assert_eq!(dir, Ordering::Greater);
fn ln_1p_ref(&self) -> Ln1pIncomplete
[src]
Computes the natural logorithm of one plus the value.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let two_to_m10 = (-10f64).exp2(); let f = Float::with_val(53, 1.5 * two_to_m10); let ln_1p = Float::with_val(53, f.ln_1p_ref()); let expected = 1.4989_f64 * two_to_m10; assert!((ln_1p - expected).abs() < 0.0001 * two_to_m10);
fn exp_m1(self) -> Self
[src]
Subtracts one from the exponential of self
, rounding to the
nearest.
Examples
use rug::Float; let two_to_m10 = (-10f64).exp2(); let f = Float::with_val(53, 1.5 * two_to_m10); let exp_m1 = f.exp_m1(); let expected = 1.5011_f64 * two_to_m10; assert!((exp_m1 - expected).abs() < 0.0001 * two_to_m10);
fn exp_m1_mut(&mut self)
[src]
Subtracts one from the exponential of self
, rounding to the
nearest.
Examples
use rug::Float; let two_to_m10 = (-10f64).exp2(); let mut f = Float::with_val(53, 1.5 * two_to_m10); f.exp_m1_mut(); let expected = 1.5011_f64 * two_to_m10; assert!((f - expected).abs() < 0.0001 * two_to_m10);
fn exp_m1_round(&mut self, round: Round) -> Ordering
[src]
Subtracts one from the exponential of self
, applying the
specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; let two_to_m10 = (-10f64).exp2(); // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.5 * two_to_m10); // exp_m1(1.5 * 2 ^ -10) = 1.5011 * 2 ^ -10 // using 4 significant bits: 1.5 * 2 ^ -10 let dir = f.exp_m1_round(Round::Nearest); assert_eq!(f, 1.5 * two_to_m10); assert_eq!(dir, Ordering::Less);
fn exp_m1_ref(&self) -> ExpM1Incomplete
[src]
Computes one less than the exponential of the value.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let two_to_m10 = (-10f64).exp2(); let f = Float::with_val(53, 1.5 * two_to_m10); let exp_m1 = Float::with_val(53, f.exp_m1_ref()); let expected = 1.5011_f64 * two_to_m10; assert!((exp_m1 - expected).abs() < 0.0001 * two_to_m10);
fn eint(self) -> Self
[src]
Computes the exponential integral, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let eint = f.eint(); let expected = 2.5810_f64; assert!((eint - expected).abs() < 0.0001);
fn eint_mut(&mut self)
[src]
Computes the exponential integral, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.25); f.eint_mut(); let expected = 2.5810_f64; assert!((f - expected).abs() < 0.0001);
fn eint_round(&mut self, round: Round) -> Ordering
[src]
Computes the exponential integral, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.25); // eint(1.25) = 2.5810 // using 4 significant bits: 2.5 let dir = f.eint_round(Round::Nearest); assert_eq!(f, 2.5); assert_eq!(dir, Ordering::Less);
fn eint_ref(&self) -> EintIncomplete
[src]
Computes the exponential integral.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let eint = Float::with_val(53, f.eint_ref()); let expected = 2.5810_f64; assert!((eint - expected).abs() < 0.0001);
fn li2(self) -> Self
[src]
Computes the real part of the dilogarithm of self
, rounding
to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let li2 = f.li2(); let expected = 2.1902_f64; assert!((li2 - expected).abs() < 0.0001);
fn li2_mut(&mut self)
[src]
Computes the real part of the dilogarithm of self
, rounding
to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.25); f.li2_mut(); let expected = 2.1902_f64; assert!((f - expected).abs() < 0.0001);
fn li2_round(&mut self, round: Round) -> Ordering
[src]
Computes the real part of the dilogarithm of self
, applying
the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.25); // li2(1.25) = 2.1902 // using 4 significant bits: 2.25 let dir = f.li2_round(Round::Nearest); assert_eq!(f, 2.25); assert_eq!(dir, Ordering::Greater);
fn li2_ref(&self) -> Li2Incomplete
[src]
Computes the real part of the dilogarithm of the value.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let li2 = Float::with_val(53, f.li2_ref()); let expected = 2.1902_f64; assert!((li2 - expected).abs() < 0.0001);
fn gamma(self) -> Self
[src]
Computes the value of the gamma function on self
, rounding
to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let gamma = f.gamma(); let expected = 0.9064_f64; assert!((gamma - expected).abs() < 0.0001);
fn gamma_mut(&mut self)
[src]
Computes the value of the gamma function on self
, rounding
to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.25); f.gamma_mut(); let expected = 0.9064_f64; assert!((f - expected).abs() < 0.0001);
fn gamma_round(&mut self, round: Round) -> Ordering
[src]
Computes the value of the gamma function on self
, applying
the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.25); // gamma(1.25) = 0.9064 // using 4 significant bits: 0.9375 let dir = f.gamma_round(Round::Nearest); assert_eq!(f, 0.9375); assert_eq!(dir, Ordering::Greater);
fn gamma_ref(&self) -> GammaIncomplete
[src]
Computes the gamma function on the value.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let gamma = Float::with_val(53, f.gamma_ref()); let expected = 0.9064_f64; assert!((gamma - expected).abs() < 0.0001);
fn gamma_inc(self, x: &Self) -> Self
[src]
Computes the value of the upper incomplete gamma function
on self
and x
, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let x = Float::with_val(53, 2.5); let gamma_inc = f.gamma_inc(&x); let expected = 0.1116_f64; assert!((gamma_inc - expected).abs() < 0.0001);
fn gamma_inc_mut(&mut self, x: &Self)
[src]
Computes the value of the upper incomplete gamma function
on self
, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.25); let x = Float::with_val(53, 2.5); f.gamma_inc_mut(&x); let expected = 0.1116_f64; assert!((f - expected).abs() < 0.0001);
fn gamma_inc_round(&mut self, x: &Self, round: Round) -> Ordering
[src]
Computes the value of the upper incomplete gamma function
on self
, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.25); let x = Float::with_val(53, 2.5); // gamma_inc(1.25, 2.5) = 0.1116 // using 4 significant bits: 0.109375 let dir = f.gamma_inc_round(&x, Round::Nearest); assert_eq!(f, 0.109375); assert_eq!(dir, Ordering::Less);
fn gamma_inc_ref<'a>(&'a self, x: &'a Self) -> GammaIncIncomplete<'a>
[src]
Computes the upper incomplete gamma function on the value.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let x = Float::with_val(53, 2.5); let gamma_inc = Float::with_val(53, f.gamma_inc_ref(&x)); let expected = 0.1116_f64; assert!((gamma_inc - expected).abs() < 0.0001);
fn ln_gamma(self) -> Self
[src]
Computes the logarithm of the gamma function on self
,
rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let ln_gamma = f.ln_gamma(); let expected = -0.0983_f64; assert!((ln_gamma - expected).abs() < 0.0001);
fn ln_gamma_mut(&mut self)
[src]
Computes the logarithm of the gamma function on self
,
rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.25); f.ln_gamma_mut(); let expected = -0.0983_f64; assert!((f - expected).abs() < 0.0001);
fn ln_gamma_round(&mut self, round: Round) -> Ordering
[src]
Computes the logarithm of the gamma function on self
,
applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.25); // ln_gamma(1.25) = -0.0983 // using 4 significant bits: -0.1015625 let dir = f.ln_gamma_round(Round::Nearest); assert_eq!(f, -0.1015625); assert_eq!(dir, Ordering::Less);
fn ln_gamma_ref(&self) -> LnGammaIncomplete
[src]
Computes the logarithm of the gamma function on the value.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let ln_gamma = Float::with_val(53, f.ln_gamma_ref()); let expected = -0.0983_f64; assert!((ln_gamma - expected).abs() < 0.0001);
fn ln_abs_gamma(self) -> (Self, Ordering)
[src]
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
[src]
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)
[src]
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) -> LnAbsGammaIncomplete
[src]
Computes the logarithm of the absolute value of the gamma
function on val
.
AssignRound<Src> for (Float, Ordering)
and
AssignRound<Src> for (&mut Float, &mut Ordering)
are
implemented with the returned object as Src
.
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) -> Self
[src]
Computes the value of the Digamma function on self
, rounding
to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let digamma = f.digamma(); let expected = -0.2275_f64; assert!((digamma - expected).abs() < 0.0001);
fn digamma_mut(&mut self)
[src]
Computes the value of the Digamma function on self
, rounding
to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.25); f.digamma_mut(); let expected = -0.2275_f64; assert!((f - expected).abs() < 0.0001);
fn digamma_round(&mut self, round: Round) -> Ordering
[src]
Computes the value of the Digamma function on self
, applying
the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.25); // digamma(1.25) = -0.2275 // using 4 significant bits: -0.234375 let dir = f.digamma_round(Round::Nearest); assert_eq!(f, -0.234375); assert_eq!(dir, Ordering::Less);
fn digamma_ref(&self) -> DigammaIncomplete
[src]
Computes the Digamma function on the value.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let digamma = Float::with_val(53, f.digamma_ref()); let expected = -0.2275_f64; assert!((digamma - expected).abs() < 0.0001);
fn zeta(self) -> Self
[src]
Computes the value of the Riemann Zeta function on self
,
rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let zeta = f.zeta(); let expected = 4.5951_f64; assert!((zeta - expected).abs() < 0.0001);
fn zeta_mut(&mut self)
[src]
Computes the value of the Riemann Zeta function on self
,
rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.25); f.zeta_mut(); let expected = 4.5951_f64; assert!((f - expected).abs() < 0.0001);
fn zeta_round(&mut self, round: Round) -> Ordering
[src]
Computes the value of the Riemann Zeta function on self
,
applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.25); // zeta(1.25) = 4.5951 // using 4 significant bits: 4.5 let dir = f.zeta_round(Round::Nearest); assert_eq!(f, 4.5); assert_eq!(dir, Ordering::Less);
fn zeta_ref(&self) -> ZetaIncomplete
[src]
Computes the Riemann Zeta function on the value.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let zeta = Float::with_val(53, f.zeta_ref()); let expected = 4.5951_f64; assert!((zeta - expected).abs() < 0.0001);
fn zeta_u(u: u32) -> ZetaUIncomplete
[src]
Computes the Riemann Zeta function on u.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let z = Float::zeta_u(3); let f = Float::with_val(53, z); let expected = 1.2021_f64; assert!((f - expected).abs() < 0.0001);
fn erf(self) -> Self
[src]
Computes the value of the error function, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let erf = f.erf(); let expected = 0.9229_f64; assert!((erf - expected).abs() < 0.0001);
fn erf_mut(&mut self)
[src]
Computes the value of the error function, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.25); f.erf_mut(); let expected = 0.9229_f64; assert!((f - expected).abs() < 0.0001);
fn erf_round(&mut self, round: Round) -> Ordering
[src]
Computes the value of the error function, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.25); // erf(1.25) = 0.9229 // using 4 significant bits: 0.9375 let dir = f.erf_round(Round::Nearest); assert_eq!(f, 0.9375); assert_eq!(dir, Ordering::Greater);
fn erf_ref(&self) -> ErfIncomplete
[src]
Computes the error function.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let erf = Float::with_val(53, f.erf_ref()); let expected = 0.9229_f64; assert!((erf - expected).abs() < 0.0001);
fn erfc(self) -> Self
[src]
Computes the value of the complementary error function, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let erfc = f.erfc(); let expected = 0.0771_f64; assert!((erfc - expected).abs() < 0.0001);
fn erfc_mut(&mut self)
[src]
Computes the value of the complementary error function, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.25); f.erfc_mut(); let expected = 0.0771_f64; assert!((f - expected).abs() < 0.0001);
fn erfc_round(&mut self, round: Round) -> Ordering
[src]
Computes the value of the complementary error function, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.25); // erfc(1.25) = 0.0771 // using 4 significant bits: 0.078125 let dir = f.erfc_round(Round::Nearest); assert_eq!(f, 0.078125); assert_eq!(dir, Ordering::Greater);
fn erfc_ref(&self) -> ErfcIncomplete
[src]
Computes the complementary error function.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let erfc = Float::with_val(53, f.erfc_ref()); let expected = 0.0771_f64; assert!((erfc - expected).abs() < 0.0001);
fn j0(self) -> Self
[src]
Computes the value of the first kind Bessel function of order 0, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let j0 = f.j0(); let expected = 0.6459_f64; assert!((j0 - expected).abs() < 0.0001);
fn j0_mut(&mut self)
[src]
Computes the value of the first kind Bessel function of order 0, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.25); f.j0_mut(); let expected = 0.6459_f64; assert!((f - expected).abs() < 0.0001);
fn j0_round(&mut self, round: Round) -> Ordering
[src]
Computes the value of the first kind Bessel function of order 0, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.25); // j0(1.25) = 0.6459 // using 4 significant bits: 0.625 let dir = f.j0_round(Round::Nearest); assert_eq!(f, 0.625); assert_eq!(dir, Ordering::Less);
fn j0_ref(&self) -> J0Incomplete
[src]
Computes the first kind Bessel function of order 0.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let j0 = Float::with_val(53, f.j0_ref()); let expected = 0.6459_f64; assert!((j0 - expected).abs() < 0.0001);
fn j1(self) -> Self
[src]
Computes the value of the first kind Bessel function of order 1, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let j1 = f.j1(); let expected = 0.5106_f64; assert!((j1 - expected).abs() < 0.0001);
fn j1_mut(&mut self)
[src]
Computes the value of the first kind Bessel function of order 1, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.25); f.j1_mut(); let expected = 0.5106_f64; assert!((f - expected).abs() < 0.0001);
fn j1_round(&mut self, round: Round) -> Ordering
[src]
Computes the value of the first kind Bessel function of order 1, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.25); // j1(1.25) = 0.5106 // using 4 significant bits: 0.5 let dir = f.j1_round(Round::Nearest); assert_eq!(f, 0.5); assert_eq!(dir, Ordering::Less);
fn j1_ref(&self) -> J1Incomplete
[src]
Computes the first kind Bessel function of order 1.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let j1 = Float::with_val(53, f.j1_ref()); let expected = 0.5106_f64; assert!((j1 - expected).abs() < 0.0001);
fn jn(self, n: i32) -> Self
[src]
Computes the value of the first kind Bessel function of order n, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let j2 = f.jn(2); let expected = 0.1711_f64; assert!((j2 - expected).abs() < 0.0001);
fn jn_mut(&mut self, n: i32)
[src]
Computes the value of the first kind Bessel function of order n, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.25); f.jn_mut(2); let expected = 0.1711_f64; assert!((f - expected).abs() < 0.0001);
fn jn_round(&mut self, n: i32, round: Round) -> Ordering
[src]
Computes the value of the first kind Bessel function of order n, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.25); // j2(1.25) = 0.1711 // using 4 significant bits: 0.171875 let dir = f.jn_round(2, Round::Nearest); assert_eq!(f, 0.171875); assert_eq!(dir, Ordering::Greater);
fn jn_ref(&self, n: i32) -> JnIncomplete
[src]
Computes the first kind Bessel function of order n.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let j2 = Float::with_val(53, f.jn_ref(2)); let expected = 0.1711_f64; assert!((j2 - expected).abs() < 0.0001);
fn y0(self) -> Self
[src]
Computes the value of the second kind Bessel function of order 0, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let y0 = f.y0(); let expected = 0.2582_f64; assert!((y0 - expected).abs() < 0.0001);
fn y0_mut(&mut self)
[src]
Computes the value of the second kind Bessel function of order 0, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.25); f.y0_mut(); let expected = 0.2582_f64; assert!((f - expected).abs() < 0.0001);
fn y0_round(&mut self, round: Round) -> Ordering
[src]
Computes the value of the second kind Bessel function of order 0, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.25); // y0(1.25) = 0.2582 // using 4 significant bits: 0.25 let dir = f.y0_round(Round::Nearest); assert_eq!(f, 0.25); assert_eq!(dir, Ordering::Less);
fn y0_ref(&self) -> Y0Incomplete
[src]
Computes the second kind Bessel function of order 0.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let y0 = Float::with_val(53, f.y0_ref()); let expected = 0.2582_f64; assert!((y0 - expected).abs() < 0.0001);
fn y1(self) -> Self
[src]
Computes the value of the second kind Bessel function of order 1, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let y1 = f.y1(); let expected = -0.5844_f64; assert!((y1 - expected).abs() < 0.0001);
fn y1_mut(&mut self)
[src]
Computes the value of the second kind Bessel function of order 1, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.25); f.y1_mut(); let expected = -0.5844_f64; assert!((f - expected).abs() < 0.0001);
fn y1_round(&mut self, round: Round) -> Ordering
[src]
Computes the value of the second kind Bessel function of order 1, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.25); // y1(1.25) = -0.5844 // using 4 significant bits: -0.5625 let dir = f.y1_round(Round::Nearest); assert_eq!(f, -0.5625); assert_eq!(dir, Ordering::Greater);
fn y1_ref(&self) -> Y1Incomplete
[src]
Computes the second kind Bessel function of order 1.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let y1 = Float::with_val(53, f.y1_ref()); let expected = -0.5844_f64; assert!((y1 - expected).abs() < 0.0001);
fn yn(self, n: i32) -> Self
[src]
Computes the value of the second kind Bessel function of order n, rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let y2 = f.yn(2); let expected = -1.1932_f64; assert!((y2 - expected).abs() < 0.0001);
fn yn_mut(&mut self, n: i32)
[src]
Computes the value of the second kind Bessel function of order n, rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.25); f.yn_mut(2); let expected = -1.1932_f64; assert!((f - expected).abs() < 0.0001);
fn yn_round(&mut self, n: i32, round: Round) -> Ordering
[src]
Computes the value of the second kind Bessel function of order n, applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.25); // y2(1.25) = -1.1932 // using 4 significant bits: -1.25 let dir = f.yn_round(2, Round::Nearest); assert_eq!(f, -1.25); assert_eq!(dir, Ordering::Less);
fn yn_ref(&self, n: i32) -> YnIncomplete
[src]
Computes the second kind Bessel function of order n.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let y2 = Float::with_val(53, f.yn_ref(2)); let expected = -1.1932_f64; assert!((y2 - expected).abs() < 0.0001);
fn agm(self, other: &Self) -> Self
[src]
Computes the arithmetic-geometric mean of self
and other
,
rounding to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let g = Float::with_val(53, 3.75); let agm = f.agm(&g); let expected = 2.3295_f64; assert!((agm - expected).abs() < 0.0001);
fn agm_mut(&mut self, other: &Self)
[src]
Computes the arithmetic-geometric mean of self
and other
,
rounding to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.25); let g = Float::with_val(53, 3.75); f.agm_mut(&g); let expected = 2.3295_f64; assert!((f - expected).abs() < 0.0001);
fn agm_round(&mut self, other: &Self, round: Round) -> Ordering
[src]
Computes the arithmetic-geometric mean of self
and other
,
applying the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.25); let g = Float::with_val(4, 3.75); // agm(1.25, 3.75) = 2.3295 // using 4 significant bits: 2.25 let dir = f.agm_round(&g, Round::Nearest); assert_eq!(f, 2.25); assert_eq!(dir, Ordering::Less);
fn agm_ref<'a>(&'a self, other: &'a Self) -> AgmIncomplete<'a>
[src]
Computes the arithmetic-geometric mean.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let g = Float::with_val(53, 3.75); let agm = Float::with_val(53, f.agm_ref(&g)); let expected = 2.3295_f64; assert!((agm - expected).abs() < 0.0001);
fn hypot(self, other: &Self) -> Self
[src]
Computes the Euclidean norm of self
and other
, rounding to
the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let g = Float::with_val(53, 3.75); let hypot = f.hypot(&g); let expected = 3.9528_f64; assert!((hypot - expected).abs() < 0.0001);
fn hypot_mut(&mut self, other: &Self)
[src]
Computes the Euclidean norm of self
and other
, rounding to
the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.25); let g = Float::with_val(53, 3.75); f.hypot_mut(&g); let expected = 3.9528_f64; assert!((f - expected).abs() < 0.0001);
fn hypot_round(&mut self, other: &Self, round: Round) -> Ordering
[src]
Computes the Euclidean norm of self
and other
, applying
the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.25); let g = Float::with_val(4, 3.75); // hypot(1.25) = 3.9528 // using 4 significant bits: 4.0 let dir = f.hypot_round(&g, Round::Nearest); assert_eq!(f, 4.0); assert_eq!(dir, Ordering::Greater);
fn hypot_ref<'a>(&'a self, other: &'a Self) -> HypotIncomplete<'a>
[src]
Computes the Euclidean norm.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let g = Float::with_val(53, 3.75); let hypot = Float::with_val(53, f.hypot_ref(&g)); let expected = 3.9528_f64; assert!((hypot - expected).abs() < 0.0001);
fn ai(self) -> Self
[src]
Computes the value of the Airy function Ai on self
, rounding
to the nearest.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let ai = f.ai(); let expected = 0.0996_f64; assert!((ai - expected).abs() < 0.0001);
fn ai_mut(&mut self)
[src]
Computes the value of the Airy function Ai on self
, rounding
to the nearest.
Examples
use rug::Float; let mut f = Float::with_val(53, 1.25); f.ai_mut(); let expected = 0.0996_f64; assert!((f - expected).abs() < 0.0001);
fn ai_round(&mut self, round: Round) -> Ordering
[src]
Computes the value of the Airy function Ai on self
, applying
the specified rounding method.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // Use only 4 bits of precision to show rounding. let mut f = Float::with_val(4, 1.25); // ai(1.25) = 0.0996 // using 4 significant bits: 0.1015625 let dir = f.ai_round(Round::Nearest); assert_eq!(f, 0.1015625); assert_eq!(dir, Ordering::Greater);
fn ai_ref(&self) -> AiIncomplete
[src]
Computes the Airy function Ai on the value.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f = Float::with_val(53, 1.25); let ai = Float::with_val(53, f.ai_ref()); let expected = 0.0996_f64; assert!((ai - expected).abs() < 0.0001);
fn ceil(self) -> Self
[src]
Rounds up to the next higher integer.
Examples
use rug::Float; let f1 = Float::with_val(53, -23.75); let ceil1 = f1.ceil(); assert_eq!(ceil1, -23); let f2 = Float::with_val(53, 23.75); let ceil2 = f2.ceil(); assert_eq!(ceil2, 24);
fn ceil_mut(&mut self)
[src]
Rounds up to the next higher integer.
Examples
use rug::Float; let mut f1 = Float::with_val(53, -23.75); f1.ceil_mut(); assert_eq!(f1, -23); let mut f2 = Float::with_val(53, 23.75); f2.ceil_mut(); assert_eq!(f2, 24);
fn ceil_ref(&self) -> CeilIncomplete
[src]
Rounds up to the next higher integer. The result may be rounded again when assigned to the target.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f1 = Float::with_val(53, -23.75); let ceil1 = Float::with_val(53, f1.ceil_ref()); assert_eq!(ceil1, -23); let f2 = Float::with_val(53, 23.75); let ceil2 = Float::with_val(53, f2.ceil_ref()); assert_eq!(ceil2, 24);
fn floor(self) -> Self
[src]
Rounds down to the next lower integer.
Examples
use rug::Float; let f1 = Float::with_val(53, -23.75); let floor1 = f1.floor(); assert_eq!(floor1, -24); let f2 = Float::with_val(53, 23.75); let floor2 = f2.floor(); assert_eq!(floor2, 23);
fn floor_mut(&mut self)
[src]
Rounds down to the next lower integer.
Examples
use rug::Float; let mut f1 = Float::with_val(53, -23.75); f1.floor_mut(); assert_eq!(f1, -24); let mut f2 = Float::with_val(53, 23.75); f2.floor_mut(); assert_eq!(f2, 23);
fn floor_ref(&self) -> FloorIncomplete
[src]
Rounds down to the next lower integer. The result may be rounded again when assigned to the target.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f1 = Float::with_val(53, -23.75); let floor1 = Float::with_val(53, f1.floor_ref()); assert_eq!(floor1, -24); let f2 = Float::with_val(53, 23.75); let floor2 = Float::with_val(53, f2.floor_ref()); assert_eq!(floor2, 23);
fn round(self) -> Self
[src]
Rounds to the nearest integer, rounding half-way cases away from zero.
Examples
use rug::Float; let f1 = Float::with_val(53, -23.75); let round1 = f1.round(); assert_eq!(round1, -24); let f2 = Float::with_val(53, 23.75); let round2 = f2.round(); assert_eq!(round2, 24);
fn round_mut(&mut self)
[src]
Rounds to the nearest integer, rounding half-way cases away from zero.
Examples
use rug::Float; let mut f1 = Float::with_val(53, -23.75); f1.round_mut(); assert_eq!(f1, -24); let mut f2 = Float::with_val(53, 23.75); f2.round_mut(); assert_eq!(f2, 24);
fn round_ref(&self) -> RoundIncomplete
[src]
Rounds to the nearest integer, rounding half-way cases away from zero. The result may be rounded again when assigned to the target.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f1 = Float::with_val(53, -23.75); let round1 = Float::with_val(53, f1.round_ref()); assert_eq!(round1, -24); let f2 = Float::with_val(53, 23.75); let round2 = Float::with_val(53, f2.round_ref()); assert_eq!(round2, 24);
Double rounding may happen when assigning to a target with a precision less than the number of significant bits for the truncated integer.
use rug::Float; use rug::float::Round; use rug::ops::AssignRound; 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 round_even(self) -> Self
[src]
Rounds to the nearest integer, rounding half-way cases to even.
Examples
use rug::Float; let f1 = Float::with_val(53, 23.5); let round1 = f1.round_even(); assert_eq!(round1, 24); let f2 = Float::with_val(53, 24.5); let round2 = f2.round_even(); assert_eq!(round2, 24);
fn round_even_mut(&mut self)
[src]
Rounds to the nearest integer, rounding half-way cases to even.
Examples
use rug::Float; let mut f1 = Float::with_val(53, 23.5); f1.round_even_mut(); assert_eq!(f1, 24); let mut f2 = Float::with_val(53, 24.5); f2.round_even_mut(); assert_eq!(f2, 24);
fn round_even_ref(&self) -> RoundEvenIncomplete
[src]
Rounds to the nearest integer, rounding half-way cases to even. The result may be rounded again when assigned to the target.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f1 = Float::with_val(53, 23.5); let round1 = Float::with_val(53, f1.round_even_ref()); assert_eq!(round1, 24); let f2 = Float::with_val(53, 24.5); let round2 = Float::with_val(53, f2.round_even_ref()); assert_eq!(round2, 24);
fn trunc(self) -> Self
[src]
Rounds to the next integer towards zero.
Examples
use rug::Float; let f1 = Float::with_val(53, -23.75); let trunc1 = f1.trunc(); assert_eq!(trunc1, -23); let f2 = Float::with_val(53, 23.75); let trunc2 = f2.trunc(); assert_eq!(trunc2, 23);
fn trunc_mut(&mut self)
[src]
Rounds to the next integer towards zero.
Examples
use rug::Float; let mut f1 = Float::with_val(53, -23.75); f1.trunc_mut(); assert_eq!(f1, -23); let mut f2 = Float::with_val(53, 23.75); f2.trunc_mut(); assert_eq!(f2, 23);
fn trunc_ref(&self) -> TruncIncomplete
[src]
Rounds to the next integer towards zero. The result may be rounded again when assigned to the target.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f1 = Float::with_val(53, -23.75); let trunc1 = Float::with_val(53, f1.trunc_ref()); assert_eq!(trunc1, -23); let f2 = Float::with_val(53, 23.75); let trunc2 = Float::with_val(53, f2.trunc_ref()); assert_eq!(trunc2, 23);
fn fract(self) -> Self
[src]
Gets the fractional part of the number.
Examples
use rug::Float; let f1 = Float::with_val(53, -23.75); let fract1 = f1.fract(); assert_eq!(fract1, -0.75); let f2 = Float::with_val(53, 23.75); let fract2 = f2.fract(); assert_eq!(fract2, 0.75);
fn fract_mut(&mut self)
[src]
Gets the fractional part of the number.
Examples
use rug::Float; let mut f1 = Float::with_val(53, -23.75); f1.fract_mut(); assert_eq!(f1, -0.75); let mut f2 = Float::with_val(53, 23.75); f2.fract_mut(); assert_eq!(f2, 0.75);
fn fract_ref(&self) -> FractIncomplete
[src]
Gets the fractional part of the number.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::Float; let f1 = Float::with_val(53, -23.75); let fract1 = Float::with_val(53, f1.fract_ref()); assert_eq!(fract1, -0.75); let f2 = Float::with_val(53, 23.75); let fract2 = Float::with_val(53, f2.fract_ref()); assert_eq!(fract2, 0.75);
fn trunc_fract(self, fract: Self) -> (Self, Self)
[src]
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.
Examples
use rug::Float; let f1 = Float::with_val(53, -23.75); let (trunc1, fract1) = f1.trunc_fract(Float::new(53)); assert_eq!(trunc1, -23); assert_eq!(fract1, -0.75); let f2 = Float::with_val(53, 23.75); let (trunc2, fract2) = f2.trunc_fract(Float::new(53)); assert_eq!(trunc2, 23); assert_eq!(fract2, 0.75);
fn trunc_fract_mut(&mut self, fract: &mut Self)
[src]
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.
Examples
use rug::Float; let mut f1 = Float::with_val(53, -23.75); let mut fract1 = Float::new(53); f1.trunc_fract_mut(&mut fract1); assert_eq!(f1, -23); assert_eq!(fract1, -0.75); let mut f2 = Float::with_val(53, 23.75); let mut fract2 = Float::new(53); f2.trunc_fract_mut(&mut fract2); assert_eq!(f2, 23); assert_eq!(fract2, 0.75);
fn trunc_fract_round(
&mut self,
fract: &mut Self,
round: Round
) -> (Ordering, Ordering)
[src]
&mut self,
fract: &mut Self,
round: Round
) -> (Ordering, Ordering)
Gets the integer and fractional parts of the number, applying the specified rounding method.
The first element of the returned tuple of rounding
directions is always Ordering::Equal
, as truncating a
value in place will always be exact.
The integer part is stored in self
and keeps its
precision, while the fractional part is stored in fract
keeping its precision.
Examples
use rug::Float; use rug::float::Round; use std::cmp::Ordering; // 0.515625 in binary is 0.100001 let mut f1 = Float::with_val(53, -23.515625); let mut fract1 = Float::new(4); let dir1 = f1.trunc_fract_round(&mut fract1, Round::Nearest); assert_eq!(f1, -23); assert_eq!(fract1, -0.5); assert_eq!(dir1, (Ordering::Equal, Ordering::Greater)); let mut f2 = Float::with_val(53, 23.515625); let mut fract2 = Float::new(4); let dir2 = f2.trunc_fract_round(&mut fract2, Round::Nearest); assert_eq!(f2, 23); assert_eq!(fract2, 0.5); assert_eq!(dir2, (Ordering::Equal, Ordering::Less));
fn trunc_fract_ref(&self) -> TruncFractIncomplete
[src]
Gets the integer and fractional parts of the number.
AssignRound<Src> for Float
is implemented with the returned object as Src
.
Examples
use rug::{Assign, Float}; let f1 = Float::with_val(53, -23.75); let r1 = f1.trunc_fract_ref(); let (mut trunc1, mut fract1) = (Float::new(53), Float::new(53)); (&mut trunc1, &mut fract1).assign(r1); assert_eq!(trunc1, -23); assert_eq!(fract1, -0.75); let f2 = Float::with_val(53, -23.75); let r2 = f2.trunc_fract_ref(); let (mut trunc2, mut fract2) = (Float::new(53), Float::new(53)); (&mut trunc2, &mut fract2).assign(r2); assert_eq!(trunc2, -23); assert_eq!(fract2, -0.75);
fn random_bits<'a, 'b: 'a>(
rng: &'a mut RandState<'b>
) -> RandomBitsIncomplete<'a, 'b>
[src]
rng: &'a mut RandState<'b>
) -> RandomBitsIncomplete<'a, 'b>
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.
There is a corner case where the generated random number is converted to NaN: if the precision is very large, the generated random number could have an exponent less than the allowed minimum exponent, and NaN is used to indicate this. For this to occur in practice, the minimum exponent has to be set to have a very small magnitude using the low-level MPFR interface, or the random number generator has to be designed specifically to trigger this case.
Assign<Src> for Float
is implemented
with the returned object as Src
.
Examples
use rug::{Assign, Float}; use rug::rand::RandState; let mut rand = RandState::new(); let mut f = Float::new(2); f.assign(Float::random_bits(&mut rand)); assert!(f == 0.0 || f == 0.25 || f == 0.5 || f == 0.75); println!("0.0 ≤ {} < 1.0", f);
fn random_cont<'a, 'b: 'a>(rng: &'a mut RandState<'b>) -> RandomCont<'a, 'b>
[src]
Generates a random number in the continuous range 0 ≤ x < 1.
The result can be rounded up to be equal to one. Unlike the
random_bits
method 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.
Rounding directions for generated random numbers cannot be
Ordering::Equal
, as the random numbers generated can be
considered to have infinite precision before rounding.
AssignRound<Src> for Float
is
implemented with the returned object as Src
.
Examples
use rug::Float; use rug::rand::RandState; let mut rand = RandState::new(); let f = Float::with_val(2, Float::random_cont(&mut rand)); // The significand is either 0b10 or 0b11 assert!( f == 1.0 || f == 0.75 || f == 0.5 || f == 0.375 || f == 0.25 || f <= 0.1875 );
fn random_normal<'a, 'b: 'a>(rng: &'a mut RandState<'b>) -> RandomNormal<'a, 'b>
[src]
Generates a random number according to a standard normal Gaussian distribution, rounding to the nearest.
Rounding directions for generated random numbers cannot be
Ordering::Equal
, as the random numbers generated can be
considered to have infinite precision before rounding.
AssignRound<Src> for Float
is
implemented with the returned object as Src
.
Examples
use rug::Float; use rug::rand::RandState; let mut rand = RandState::new(); let f = Float::with_val(53, Float::random_normal(&mut rand)); println!("Normal random number: {}", f);
fn random_exp<'a, 'b: 'a>(rng: &'a mut RandState<'b>) -> RandomExp<'a, 'b>
[src]
Generates a random number according to an exponential distribution with mean one, rounding to the nearest.
Rounding directions for generated random numbers cannot be
Ordering::Equal
, as the random numbers generated can be
considered to have infinite precision before rounding.
AssignRound<Src> for Float
is
implemented with the returned object as Src
.
Examples
use rug::Float; use rug::rand::RandState; let mut rand = RandState::new(); let f = Float::with_val(53, Float::random_exp(&mut rand)); println!("Exponential random number: {}", f);
Trait Implementations
impl Neg for Float
[src]
type Output = Float
The resulting type after applying the -
operator.
fn neg(self) -> Float
[src]
Performs the unary -
operation.
impl NegAssign for Float
[src]
fn neg_assign(&mut self)
[src]
Peforms the negation. Read more
impl<'a> Neg for &'a Float
[src]
type Output = NegIncomplete<'a>
The resulting type after applying the -
operator.
fn neg(self) -> NegIncomplete<'a>
[src]
Performs the unary -
operation.
impl<'a> AssignRound<NegIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: NegIncomplete<'a>, round: Round) -> Ordering
[src]
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
[src]
Performs the +
operation.
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
[src]
Performs the +
operation.
impl<'a> Add<&'a Float> for &'a Float
[src]
type Output = AddIncomplete<'a>
The resulting type after applying the +
operator.
fn add(self, rhs: &'a Float) -> AddIncomplete<'a>
[src]
Performs the +
operation.
impl AddAssign<Float> for Float
[src]
fn add_assign(&mut self, rhs: Float)
[src]
Performs the +=
operation.
impl<'a> AddAssign<&'a Float> for Float
[src]
fn add_assign(&mut self, rhs: &'a Float)
[src]
Performs the +=
operation.
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
[src]
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
[src]
Performs the addition. Read more
impl<'a> AssignRound<AddIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AddIncomplete<'a>, round: Round) -> Ordering
[src]
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
[src]
Performs the +
operation.
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
[src]
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
[src]
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
[src]
Performs the -
operation.
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
[src]
Performs the -
operation.
impl<'a> Sub<&'a Float> for &'a Float
[src]
type Output = SubIncomplete<'a>
The resulting type after applying the -
operator.
fn sub(self, rhs: &'a Float) -> SubIncomplete<'a>
[src]
Performs the -
operation.
impl SubAssign<Float> for Float
[src]
fn sub_assign(&mut self, rhs: Float)
[src]
Performs the -=
operation.
impl<'a> SubAssign<&'a Float> for Float
[src]
fn sub_assign(&mut self, rhs: &'a Float)
[src]
Performs the -=
operation.
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
[src]
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
[src]
Performs the subtraction. Read more
impl<'a> AssignRound<SubIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SubIncomplete<'a>, round: Round) -> Ordering
[src]
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
[src]
Performs the -
operation.
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
[src]
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
[src]
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
[src]
Performs the *
operation.
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
[src]
Performs the *
operation.
impl<'a> Mul<&'a Float> for &'a Float
[src]
type Output = MulIncomplete<'a>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'a Float) -> MulIncomplete<'a>
[src]
Performs the *
operation.
impl MulAssign<Float> for Float
[src]
fn mul_assign(&mut self, rhs: Float)
[src]
Performs the *=
operation.
impl<'a> MulAssign<&'a Float> for Float
[src]
fn mul_assign(&mut self, rhs: &'a Float)
[src]
Performs the *=
operation.
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
[src]
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
[src]
Performs the multiplication. Read more
impl<'a> AssignRound<MulIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: MulIncomplete<'a>, round: Round) -> Ordering
[src]
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
[src]
Performs the *
operation.
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
[src]
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
[src]
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
[src]
Performs the /
operation.
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
[src]
Performs the /
operation.
impl<'a> Div<&'a Float> for &'a Float
[src]
type Output = DivIncomplete<'a>
The resulting type after applying the /
operator.
fn div(self, rhs: &'a Float) -> DivIncomplete<'a>
[src]
Performs the /
operation.
impl DivAssign<Float> for Float
[src]
fn div_assign(&mut self, rhs: Float)
[src]
Performs the /=
operation.
impl<'a> DivAssign<&'a Float> for Float
[src]
fn div_assign(&mut self, rhs: &'a Float)
[src]
Performs the /=
operation.
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
[src]
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
[src]
Performs the division. Read more
impl<'a> AssignRound<DivIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: DivIncomplete<'a>, round: Round) -> Ordering
[src]
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
[src]
Performs the /
operation.
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
[src]
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
[src]
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
[src]
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
[src]
Performs the power operation. Read more
impl<'a> Pow<&'a Float> for &'a Float
[src]
type Output = PowIncomplete<'a>
The resulting type after the power operation.
fn pow(self, rhs: &'a Float) -> PowIncomplete<'a>
[src]
Performs the power operation. Read more
impl PowAssign<Float> for Float
[src]
fn pow_assign(&mut self, rhs: Float)
[src]
Peforms the power operation. Read more
impl<'a> PowAssign<&'a Float> for Float
[src]
fn pow_assign(&mut self, rhs: &'a Float)
[src]
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
[src]
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
[src]
Performs the power operation. Read more
impl<'a> AssignRound<PowIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: PowIncomplete<'a>, round: Round) -> Ordering
[src]
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
[src]
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
[src]
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
[src]
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
[src]
Performs the +
operation.
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
[src]
Performs the +
operation.
impl<'a> Add<&'a Integer> for &'a Float
[src]
type Output = AddIntegerIncomplete<'a>
The resulting type after applying the +
operator.
fn add(self, rhs: &'a Integer) -> AddIntegerIncomplete<'a>
[src]
Performs the +
operation.
impl AddAssign<Integer> for Float
[src]
fn add_assign(&mut self, rhs: Integer)
[src]
Performs the +=
operation.
impl<'a> AddAssign<&'a Integer> for Float
[src]
fn add_assign(&mut self, rhs: &'a Integer)
[src]
Performs the +=
operation.
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
[src]
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
[src]
Performs the addition. Read more
impl<'a> AssignRound<AddIntegerIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: AddIntegerIncomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: AddIntegerIncomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a> Add<Integer> for &'a Float
[src]
type Output = AddOwnedIntegerIncomplete<'a>
The resulting type after applying the +
operator.
fn add(self, rhs: Integer) -> AddOwnedIntegerIncomplete<'a>
[src]
Performs the +
operation.
impl<'a> AssignRound<AddOwnedIntegerIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: AddOwnedIntegerIncomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: AddOwnedIntegerIncomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a, 'b> AssignRound<&'a AddOwnedIntegerIncomplete<'b>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: &'a AddOwnedIntegerIncomplete<'b>,
round: Round
) -> Ordering
[src]
&mut self,
src: &'a AddOwnedIntegerIncomplete<'b>,
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
[src]
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
[src]
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
[src]
Performs the -
operation.
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
[src]
Performs the -
operation.
impl<'a> Sub<&'a Integer> for &'a Float
[src]
type Output = SubIntegerIncomplete<'a>
The resulting type after applying the -
operator.
fn sub(self, rhs: &'a Integer) -> SubIntegerIncomplete<'a>
[src]
Performs the -
operation.
impl SubAssign<Integer> for Float
[src]
fn sub_assign(&mut self, rhs: Integer)
[src]
Performs the -=
operation.
impl<'a> SubAssign<&'a Integer> for Float
[src]
fn sub_assign(&mut self, rhs: &'a Integer)
[src]
Performs the -=
operation.
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
[src]
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
[src]
Performs the subtraction. Read more
impl<'a> AssignRound<SubIntegerIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: SubIntegerIncomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: SubIntegerIncomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a> Sub<Integer> for &'a Float
[src]
type Output = SubFromIntegerIncomplete<'a>
The resulting type after applying the -
operator.
fn sub(self, rhs: Integer) -> SubFromIntegerIncomplete<'a>
[src]
Performs the -
operation.
impl<'a> AssignRound<SubFromIntegerIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: SubFromIntegerIncomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: SubFromIntegerIncomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a, 'b> AssignRound<&'a SubFromIntegerIncomplete<'b>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: &'a SubFromIntegerIncomplete<'b>,
round: Round
) -> Ordering
[src]
&mut self,
src: &'a SubFromIntegerIncomplete<'b>,
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
[src]
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
[src]
Performs the subtraction. Read more
impl<'a> AssignRound<SubOwnedIntegerIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: SubOwnedIntegerIncomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: SubOwnedIntegerIncomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<SubFromOwnedIntegerIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: SubFromOwnedIntegerIncomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: SubFromOwnedIntegerIncomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a, 'b> AssignRound<&'a SubFromOwnedIntegerIncomplete<'b>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: &'a SubFromOwnedIntegerIncomplete<'b>,
round: Round
) -> Ordering
[src]
&mut self,
src: &'a SubFromOwnedIntegerIncomplete<'b>,
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
[src]
Performs the *
operation.
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
[src]
Performs the *
operation.
impl<'a> Mul<&'a Integer> for &'a Float
[src]
type Output = MulIntegerIncomplete<'a>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'a Integer) -> MulIntegerIncomplete<'a>
[src]
Performs the *
operation.
impl MulAssign<Integer> for Float
[src]
fn mul_assign(&mut self, rhs: Integer)
[src]
Performs the *=
operation.
impl<'a> MulAssign<&'a Integer> for Float
[src]
fn mul_assign(&mut self, rhs: &'a Integer)
[src]
Performs the *=
operation.
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
[src]
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
[src]
Performs the multiplication. Read more
impl<'a> AssignRound<MulIntegerIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: MulIntegerIncomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: MulIntegerIncomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a> Mul<Integer> for &'a Float
[src]
type Output = MulOwnedIntegerIncomplete<'a>
The resulting type after applying the *
operator.
fn mul(self, rhs: Integer) -> MulOwnedIntegerIncomplete<'a>
[src]
Performs the *
operation.
impl<'a> AssignRound<MulOwnedIntegerIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: MulOwnedIntegerIncomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: MulOwnedIntegerIncomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a, 'b> AssignRound<&'a MulOwnedIntegerIncomplete<'b>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: &'a MulOwnedIntegerIncomplete<'b>,
round: Round
) -> Ordering
[src]
&mut self,
src: &'a MulOwnedIntegerIncomplete<'b>,
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
[src]
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
[src]
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
[src]
Performs the /
operation.
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
[src]
Performs the /
operation.
impl<'a> Div<&'a Integer> for &'a Float
[src]
type Output = DivIntegerIncomplete<'a>
The resulting type after applying the /
operator.
fn div(self, rhs: &'a Integer) -> DivIntegerIncomplete<'a>
[src]
Performs the /
operation.
impl DivAssign<Integer> for Float
[src]
fn div_assign(&mut self, rhs: Integer)
[src]
Performs the /=
operation.
impl<'a> DivAssign<&'a Integer> for Float
[src]
fn div_assign(&mut self, rhs: &'a Integer)
[src]
Performs the /=
operation.
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
[src]
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
[src]
Performs the division. Read more
impl<'a> AssignRound<DivIntegerIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: DivIntegerIncomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: DivIntegerIncomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a> Div<Integer> for &'a Float
[src]
type Output = DivFromIntegerIncomplete<'a>
The resulting type after applying the /
operator.
fn div(self, rhs: Integer) -> DivFromIntegerIncomplete<'a>
[src]
Performs the /
operation.
impl<'a> AssignRound<DivFromIntegerIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: DivFromIntegerIncomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: DivFromIntegerIncomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a, 'b> AssignRound<&'a DivFromIntegerIncomplete<'b>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: &'a DivFromIntegerIncomplete<'b>,
round: Round
) -> Ordering
[src]
&mut self,
src: &'a DivFromIntegerIncomplete<'b>,
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
[src]
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
[src]
Performs the division. Read more
impl<'a> AssignRound<DivOwnedIntegerIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: DivOwnedIntegerIncomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: DivOwnedIntegerIncomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<DivFromOwnedIntegerIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: DivFromOwnedIntegerIncomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: DivFromOwnedIntegerIncomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a, 'b> AssignRound<&'a DivFromOwnedIntegerIncomplete<'b>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: &'a DivFromOwnedIntegerIncomplete<'b>,
round: Round
) -> Ordering
[src]
&mut self,
src: &'a DivFromOwnedIntegerIncomplete<'b>,
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
[src]
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
[src]
Performs the power operation. Read more
impl<'a> Pow<&'a Integer> for &'a Float
[src]
type Output = PowIntegerIncomplete<'a>
The resulting type after the power operation.
fn pow(self, rhs: &'a Integer) -> PowIntegerIncomplete<'a>
[src]
Performs the power operation. Read more
impl PowAssign<Integer> for Float
[src]
fn pow_assign(&mut self, rhs: Integer)
[src]
Peforms the power operation. Read more
impl<'a> PowAssign<&'a Integer> for Float
[src]
fn pow_assign(&mut self, rhs: &'a Integer)
[src]
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
[src]
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
[src]
Performs the power operation. Read more
impl<'a> AssignRound<PowIntegerIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: PowIntegerIncomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: PowIntegerIncomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a> Pow<Integer> for &'a Float
[src]
type Output = PowOwnedIntegerIncomplete<'a>
The resulting type after the power operation.
fn pow(self, rhs: Integer) -> PowOwnedIntegerIncomplete<'a>
[src]
Performs the power operation. Read more
impl<'a> AssignRound<PowOwnedIntegerIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: PowOwnedIntegerIncomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: PowOwnedIntegerIncomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a, 'b> AssignRound<&'a PowOwnedIntegerIncomplete<'b>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: &'a PowOwnedIntegerIncomplete<'b>,
round: Round
) -> Ordering
[src]
&mut self,
src: &'a PowOwnedIntegerIncomplete<'b>,
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
[src]
Performs the +
operation.
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
[src]
Performs the +
operation.
impl<'a> Add<&'a Rational> for &'a Float
[src]
type Output = AddRationalIncomplete<'a>
The resulting type after applying the +
operator.
fn add(self, rhs: &'a Rational) -> AddRationalIncomplete<'a>
[src]
Performs the +
operation.
impl AddAssign<Rational> for Float
[src]
fn add_assign(&mut self, rhs: Rational)
[src]
Performs the +=
operation.
impl<'a> AddAssign<&'a Rational> for Float
[src]
fn add_assign(&mut self, rhs: &'a Rational)
[src]
Performs the +=
operation.
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
[src]
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
[src]
Performs the addition. Read more
impl<'a> AssignRound<AddRationalIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: AddRationalIncomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: AddRationalIncomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a> Add<Rational> for &'a Float
[src]
type Output = AddOwnedRationalIncomplete<'a>
The resulting type after applying the +
operator.
fn add(self, rhs: Rational) -> AddOwnedRationalIncomplete<'a>
[src]
Performs the +
operation.
impl<'a> AssignRound<AddOwnedRationalIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: AddOwnedRationalIncomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: AddOwnedRationalIncomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a, 'b> AssignRound<&'a AddOwnedRationalIncomplete<'b>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: &'a AddOwnedRationalIncomplete<'b>,
round: Round
) -> Ordering
[src]
&mut self,
src: &'a AddOwnedRationalIncomplete<'b>,
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
[src]
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
[src]
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
[src]
Performs the -
operation.
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
[src]
Performs the -
operation.
impl<'a> Sub<&'a Rational> for &'a Float
[src]
type Output = SubRationalIncomplete<'a>
The resulting type after applying the -
operator.
fn sub(self, rhs: &'a Rational) -> SubRationalIncomplete<'a>
[src]
Performs the -
operation.
impl SubAssign<Rational> for Float
[src]
fn sub_assign(&mut self, rhs: Rational)
[src]
Performs the -=
operation.
impl<'a> SubAssign<&'a Rational> for Float
[src]
fn sub_assign(&mut self, rhs: &'a Rational)
[src]
Performs the -=
operation.
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
[src]
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
[src]
Performs the subtraction. Read more
impl<'a> AssignRound<SubRationalIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: SubRationalIncomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: SubRationalIncomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a> Sub<Rational> for &'a Float
[src]
type Output = SubFromRationalIncomplete<'a>
The resulting type after applying the -
operator.
fn sub(self, rhs: Rational) -> SubFromRationalIncomplete<'a>
[src]
Performs the -
operation.
impl<'a> AssignRound<SubFromRationalIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: SubFromRationalIncomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: SubFromRationalIncomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a, 'b> AssignRound<&'a SubFromRationalIncomplete<'b>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: &'a SubFromRationalIncomplete<'b>,
round: Round
) -> Ordering
[src]
&mut self,
src: &'a SubFromRationalIncomplete<'b>,
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
[src]
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
[src]
Performs the subtraction. Read more
impl<'a> AssignRound<SubOwnedRationalIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: SubOwnedRationalIncomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: SubOwnedRationalIncomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<SubFromOwnedRationalIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: SubFromOwnedRationalIncomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: SubFromOwnedRationalIncomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a, 'b> AssignRound<&'a SubFromOwnedRationalIncomplete<'b>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: &'a SubFromOwnedRationalIncomplete<'b>,
round: Round
) -> Ordering
[src]
&mut self,
src: &'a SubFromOwnedRationalIncomplete<'b>,
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
[src]
Performs the *
operation.
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
[src]
Performs the *
operation.
impl<'a> Mul<&'a Rational> for &'a Float
[src]
type Output = MulRationalIncomplete<'a>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'a Rational) -> MulRationalIncomplete<'a>
[src]
Performs the *
operation.
impl MulAssign<Rational> for Float
[src]
fn mul_assign(&mut self, rhs: Rational)
[src]
Performs the *=
operation.
impl<'a> MulAssign<&'a Rational> for Float
[src]
fn mul_assign(&mut self, rhs: &'a Rational)
[src]
Performs the *=
operation.
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
[src]
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
[src]
Performs the multiplication. Read more
impl<'a> AssignRound<MulRationalIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: MulRationalIncomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: MulRationalIncomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a> Mul<Rational> for &'a Float
[src]
type Output = MulOwnedRationalIncomplete<'a>
The resulting type after applying the *
operator.
fn mul(self, rhs: Rational) -> MulOwnedRationalIncomplete<'a>
[src]
Performs the *
operation.
impl<'a> AssignRound<MulOwnedRationalIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: MulOwnedRationalIncomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: MulOwnedRationalIncomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a, 'b> AssignRound<&'a MulOwnedRationalIncomplete<'b>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: &'a MulOwnedRationalIncomplete<'b>,
round: Round
) -> Ordering
[src]
&mut self,
src: &'a MulOwnedRationalIncomplete<'b>,
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
[src]
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
[src]
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
[src]
Performs the /
operation.
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
[src]
Performs the /
operation.
impl<'a> Div<&'a Rational> for &'a Float
[src]
type Output = DivRationalIncomplete<'a>
The resulting type after applying the /
operator.
fn div(self, rhs: &'a Rational) -> DivRationalIncomplete<'a>
[src]
Performs the /
operation.
impl DivAssign<Rational> for Float
[src]
fn div_assign(&mut self, rhs: Rational)
[src]
Performs the /=
operation.
impl<'a> DivAssign<&'a Rational> for Float
[src]
fn div_assign(&mut self, rhs: &'a Rational)
[src]
Performs the /=
operation.
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
[src]
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
[src]
Performs the division. Read more
impl<'a> AssignRound<DivRationalIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: DivRationalIncomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: DivRationalIncomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a> Div<Rational> for &'a Float
[src]
type Output = DivFromRationalIncomplete<'a>
The resulting type after applying the /
operator.
fn div(self, rhs: Rational) -> DivFromRationalIncomplete<'a>
[src]
Performs the /
operation.
impl<'a> AssignRound<DivFromRationalIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: DivFromRationalIncomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: DivFromRationalIncomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a, 'b> AssignRound<&'a DivFromRationalIncomplete<'b>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: &'a DivFromRationalIncomplete<'b>,
round: Round
) -> Ordering
[src]
&mut self,
src: &'a DivFromRationalIncomplete<'b>,
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
[src]
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
[src]
Performs the division. Read more
impl<'a> AssignRound<DivOwnedRationalIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: DivOwnedRationalIncomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: DivOwnedRationalIncomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<DivFromOwnedRationalIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: DivFromOwnedRationalIncomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: DivFromOwnedRationalIncomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a, 'b> AssignRound<&'a DivFromOwnedRationalIncomplete<'b>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: &'a DivFromOwnedRationalIncomplete<'b>,
round: Round
) -> Ordering
[src]
&mut self,
src: &'a DivFromOwnedRationalIncomplete<'b>,
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
[src]
Performs the +
operation.
impl<'t> Add<&'t i32> for Float
[src]
type Output = Float
The resulting type after applying the +
operator.
fn add(self, rhs: &'t i32) -> Float
[src]
Performs the +
operation.
impl<'b> Add<i32> for &'b Float
[src]
type Output = AddI32Incomplete<'b>
The resulting type after applying the +
operator.
fn add(self, rhs: i32) -> AddI32Incomplete<'b>
[src]
Performs the +
operation.
impl<'t, 'b> Add<&'t i32> for &'b Float
[src]
type Output = AddI32Incomplete<'b>
The resulting type after applying the +
operator.
fn add(self, rhs: &'t i32) -> AddI32Incomplete<'b>
[src]
Performs the +
operation.
impl AddAssign<i32> for Float
[src]
fn add_assign(&mut self, rhs: i32)
[src]
Performs the +=
operation.
impl<'t> AddAssign<&'t i32> for Float
[src]
fn add_assign(&mut self, rhs: &'t i32)
[src]
Performs the +=
operation.
impl<'a> AssignRound<AddI32Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AddI32Incomplete<'a>, round: Round) -> Ordering
[src]
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
[src]
Performs the addition. Read more
impl<'t> AddAssignRound<&'t i32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn add_assign_round(&mut self, rhs: &'t i32, round: Round) -> Ordering
[src]
Performs the addition. Read more
impl AddFrom<i32> for Float
[src]
impl<'t> AddFrom<&'t i32> for Float
[src]
impl 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
[src]
Performs the addition. Read more
impl<'t> AddFromRound<&'t i32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn add_from_round(&mut self, lhs: &'t i32, round: Round) -> Ordering
[src]
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
[src]
Performs the -
operation.
impl<'t> Sub<&'t i32> for Float
[src]
type Output = Float
The resulting type after applying the -
operator.
fn sub(self, rhs: &'t i32) -> Float
[src]
Performs the -
operation.
impl<'b> Sub<i32> for &'b Float
[src]
type Output = SubI32Incomplete<'b>
The resulting type after applying the -
operator.
fn sub(self, rhs: i32) -> SubI32Incomplete<'b>
[src]
Performs the -
operation.
impl<'t, 'b> Sub<&'t i32> for &'b Float
[src]
type Output = SubI32Incomplete<'b>
The resulting type after applying the -
operator.
fn sub(self, rhs: &'t i32) -> SubI32Incomplete<'b>
[src]
Performs the -
operation.
impl SubAssign<i32> for Float
[src]
fn sub_assign(&mut self, rhs: i32)
[src]
Performs the -=
operation.
impl<'t> SubAssign<&'t i32> for Float
[src]
fn sub_assign(&mut self, rhs: &'t i32)
[src]
Performs the -=
operation.
impl<'a> AssignRound<SubI32Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SubI32Incomplete<'a>, round: Round) -> Ordering
[src]
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
[src]
Performs the subtraction. Read more
impl<'t> SubAssignRound<&'t i32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn sub_assign_round(&mut self, rhs: &'t i32, round: Round) -> Ordering
[src]
Performs the subtraction. Read more
impl SubFrom<i32> for Float
[src]
impl<'t> SubFrom<&'t i32> for Float
[src]
impl 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
[src]
Performs the subtraction. Read more
impl<'t> SubFromRound<&'t i32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn sub_from_round(&mut self, lhs: &'t i32, round: Round) -> Ordering
[src]
Performs the subtraction. Read more
impl<'a> AssignRound<SubFromI32Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: SubFromI32Incomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: SubFromI32Incomplete<'a>,
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
[src]
Performs the *
operation.
impl<'t> Mul<&'t i32> for Float
[src]
type Output = Float
The resulting type after applying the *
operator.
fn mul(self, rhs: &'t i32) -> Float
[src]
Performs the *
operation.
impl<'b> Mul<i32> for &'b Float
[src]
type Output = MulI32Incomplete<'b>
The resulting type after applying the *
operator.
fn mul(self, rhs: i32) -> MulI32Incomplete<'b>
[src]
Performs the *
operation.
impl<'t, 'b> Mul<&'t i32> for &'b Float
[src]
type Output = MulI32Incomplete<'b>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'t i32) -> MulI32Incomplete<'b>
[src]
Performs the *
operation.
impl MulAssign<i32> for Float
[src]
fn mul_assign(&mut self, rhs: i32)
[src]
Performs the *=
operation.
impl<'t> MulAssign<&'t i32> for Float
[src]
fn mul_assign(&mut self, rhs: &'t i32)
[src]
Performs the *=
operation.
impl<'a> AssignRound<MulI32Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: MulI32Incomplete<'a>, round: Round) -> Ordering
[src]
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
[src]
Performs the multiplication. Read more
impl<'t> MulAssignRound<&'t i32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn mul_assign_round(&mut self, rhs: &'t i32, round: Round) -> Ordering
[src]
Performs the multiplication. Read more
impl MulFrom<i32> for Float
[src]
impl<'t> MulFrom<&'t i32> for Float
[src]
impl 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
[src]
Performs the multiplication. Read more
impl<'t> MulFromRound<&'t i32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn mul_from_round(&mut self, lhs: &'t i32, round: Round) -> Ordering
[src]
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
[src]
Performs the /
operation.
impl<'t> Div<&'t i32> for Float
[src]
type Output = Float
The resulting type after applying the /
operator.
fn div(self, rhs: &'t i32) -> Float
[src]
Performs the /
operation.
impl<'b> Div<i32> for &'b Float
[src]
type Output = DivI32Incomplete<'b>
The resulting type after applying the /
operator.
fn div(self, rhs: i32) -> DivI32Incomplete<'b>
[src]
Performs the /
operation.
impl<'t, 'b> Div<&'t i32> for &'b Float
[src]
type Output = DivI32Incomplete<'b>
The resulting type after applying the /
operator.
fn div(self, rhs: &'t i32) -> DivI32Incomplete<'b>
[src]
Performs the /
operation.
impl DivAssign<i32> for Float
[src]
fn div_assign(&mut self, rhs: i32)
[src]
Performs the /=
operation.
impl<'t> DivAssign<&'t i32> for Float
[src]
fn div_assign(&mut self, rhs: &'t i32)
[src]
Performs the /=
operation.
impl<'a> AssignRound<DivI32Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: DivI32Incomplete<'a>, round: Round) -> Ordering
[src]
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
[src]
Performs the division. Read more
impl<'t> DivAssignRound<&'t i32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn div_assign_round(&mut self, rhs: &'t i32, round: Round) -> Ordering
[src]
Performs the division. Read more
impl DivFrom<i32> for Float
[src]
impl<'t> DivFrom<&'t i32> for Float
[src]
impl 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
[src]
Performs the division. Read more
impl<'t> DivFromRound<&'t i32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn div_from_round(&mut self, lhs: &'t i32, round: Round) -> Ordering
[src]
Performs the division. Read more
impl<'a> AssignRound<DivFromI32Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: DivFromI32Incomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: DivFromI32Incomplete<'a>,
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
[src]
Performs the +
operation.
impl<'t> Add<&'t u32> for Float
[src]
type Output = Float
The resulting type after applying the +
operator.
fn add(self, rhs: &'t u32) -> Float
[src]
Performs the +
operation.
impl<'b> Add<u32> for &'b Float
[src]
type Output = AddU32Incomplete<'b>
The resulting type after applying the +
operator.
fn add(self, rhs: u32) -> AddU32Incomplete<'b>
[src]
Performs the +
operation.
impl<'t, 'b> Add<&'t u32> for &'b Float
[src]
type Output = AddU32Incomplete<'b>
The resulting type after applying the +
operator.
fn add(self, rhs: &'t u32) -> AddU32Incomplete<'b>
[src]
Performs the +
operation.
impl AddAssign<u32> for Float
[src]
fn add_assign(&mut self, rhs: u32)
[src]
Performs the +=
operation.
impl<'t> AddAssign<&'t u32> for Float
[src]
fn add_assign(&mut self, rhs: &'t u32)
[src]
Performs the +=
operation.
impl<'a> AssignRound<AddU32Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AddU32Incomplete<'a>, round: Round) -> Ordering
[src]
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
[src]
Performs the addition. Read more
impl<'t> AddAssignRound<&'t u32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn add_assign_round(&mut self, rhs: &'t u32, round: Round) -> Ordering
[src]
Performs the addition. Read more
impl AddFrom<u32> for Float
[src]
impl<'t> AddFrom<&'t u32> for Float
[src]
impl 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
[src]
Performs the addition. Read more
impl<'t> AddFromRound<&'t u32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn add_from_round(&mut self, lhs: &'t u32, round: Round) -> Ordering
[src]
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
[src]
Performs the -
operation.
impl<'t> Sub<&'t u32> for Float
[src]
type Output = Float
The resulting type after applying the -
operator.
fn sub(self, rhs: &'t u32) -> Float
[src]
Performs the -
operation.
impl<'b> Sub<u32> for &'b Float
[src]
type Output = SubU32Incomplete<'b>
The resulting type after applying the -
operator.
fn sub(self, rhs: u32) -> SubU32Incomplete<'b>
[src]
Performs the -
operation.
impl<'t, 'b> Sub<&'t u32> for &'b Float
[src]
type Output = SubU32Incomplete<'b>
The resulting type after applying the -
operator.
fn sub(self, rhs: &'t u32) -> SubU32Incomplete<'b>
[src]
Performs the -
operation.
impl SubAssign<u32> for Float
[src]
fn sub_assign(&mut self, rhs: u32)
[src]
Performs the -=
operation.
impl<'t> SubAssign<&'t u32> for Float
[src]
fn sub_assign(&mut self, rhs: &'t u32)
[src]
Performs the -=
operation.
impl<'a> AssignRound<SubU32Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SubU32Incomplete<'a>, round: Round) -> Ordering
[src]
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
[src]
Performs the subtraction. Read more
impl<'t> SubAssignRound<&'t u32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn sub_assign_round(&mut self, rhs: &'t u32, round: Round) -> Ordering
[src]
Performs the subtraction. Read more
impl SubFrom<u32> for Float
[src]
impl<'t> SubFrom<&'t u32> for Float
[src]
impl 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
[src]
Performs the subtraction. Read more
impl<'t> SubFromRound<&'t u32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn sub_from_round(&mut self, lhs: &'t u32, round: Round) -> Ordering
[src]
Performs the subtraction. Read more
impl<'a> AssignRound<SubFromU32Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: SubFromU32Incomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: SubFromU32Incomplete<'a>,
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
[src]
Performs the *
operation.
impl<'t> Mul<&'t u32> for Float
[src]
type Output = Float
The resulting type after applying the *
operator.
fn mul(self, rhs: &'t u32) -> Float
[src]
Performs the *
operation.
impl<'b> Mul<u32> for &'b Float
[src]
type Output = MulU32Incomplete<'b>
The resulting type after applying the *
operator.
fn mul(self, rhs: u32) -> MulU32Incomplete<'b>
[src]
Performs the *
operation.
impl<'t, 'b> Mul<&'t u32> for &'b Float
[src]
type Output = MulU32Incomplete<'b>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'t u32) -> MulU32Incomplete<'b>
[src]
Performs the *
operation.
impl MulAssign<u32> for Float
[src]
fn mul_assign(&mut self, rhs: u32)
[src]
Performs the *=
operation.
impl<'t> MulAssign<&'t u32> for Float
[src]
fn mul_assign(&mut self, rhs: &'t u32)
[src]
Performs the *=
operation.
impl<'a> AssignRound<MulU32Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: MulU32Incomplete<'a>, round: Round) -> Ordering
[src]
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
[src]
Performs the multiplication. Read more
impl<'t> MulAssignRound<&'t u32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn mul_assign_round(&mut self, rhs: &'t u32, round: Round) -> Ordering
[src]
Performs the multiplication. Read more
impl MulFrom<u32> for Float
[src]
impl<'t> MulFrom<&'t u32> for Float
[src]
impl 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
[src]
Performs the multiplication. Read more
impl<'t> MulFromRound<&'t u32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn mul_from_round(&mut self, lhs: &'t u32, round: Round) -> Ordering
[src]
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
[src]
Performs the /
operation.
impl<'t> Div<&'t u32> for Float
[src]
type Output = Float
The resulting type after applying the /
operator.
fn div(self, rhs: &'t u32) -> Float
[src]
Performs the /
operation.
impl<'b> Div<u32> for &'b Float
[src]
type Output = DivU32Incomplete<'b>
The resulting type after applying the /
operator.
fn div(self, rhs: u32) -> DivU32Incomplete<'b>
[src]
Performs the /
operation.
impl<'t, 'b> Div<&'t u32> for &'b Float
[src]
type Output = DivU32Incomplete<'b>
The resulting type after applying the /
operator.
fn div(self, rhs: &'t u32) -> DivU32Incomplete<'b>
[src]
Performs the /
operation.
impl DivAssign<u32> for Float
[src]
fn div_assign(&mut self, rhs: u32)
[src]
Performs the /=
operation.
impl<'t> DivAssign<&'t u32> for Float
[src]
fn div_assign(&mut self, rhs: &'t u32)
[src]
Performs the /=
operation.
impl<'a> AssignRound<DivU32Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: DivU32Incomplete<'a>, round: Round) -> Ordering
[src]
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
[src]
Performs the division. Read more
impl<'t> DivAssignRound<&'t u32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn div_assign_round(&mut self, rhs: &'t u32, round: Round) -> Ordering
[src]
Performs the division. Read more
impl DivFrom<u32> for Float
[src]
impl<'t> DivFrom<&'t u32> for Float
[src]
impl 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
[src]
Performs the division. Read more
impl<'t> DivFromRound<&'t u32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn div_from_round(&mut self, lhs: &'t u32, round: Round) -> Ordering
[src]
Performs the division. Read more
impl<'a> AssignRound<DivFromU32Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: DivFromU32Incomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: DivFromU32Incomplete<'a>,
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
[src]
Performs the +
operation.
impl<'t> Add<&'t f32> for Float
[src]
type Output = Float
The resulting type after applying the +
operator.
fn add(self, rhs: &'t f32) -> Float
[src]
Performs the +
operation.
impl<'b> Add<f32> for &'b Float
[src]
type Output = AddF32Incomplete<'b>
The resulting type after applying the +
operator.
fn add(self, rhs: f32) -> AddF32Incomplete<'b>
[src]
Performs the +
operation.
impl<'t, 'b> Add<&'t f32> for &'b Float
[src]
type Output = AddF32Incomplete<'b>
The resulting type after applying the +
operator.
fn add(self, rhs: &'t f32) -> AddF32Incomplete<'b>
[src]
Performs the +
operation.
impl AddAssign<f32> for Float
[src]
fn add_assign(&mut self, rhs: f32)
[src]
Performs the +=
operation.
impl<'t> AddAssign<&'t f32> for Float
[src]
fn add_assign(&mut self, rhs: &'t f32)
[src]
Performs the +=
operation.
impl<'a> AssignRound<AddF32Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AddF32Incomplete<'a>, round: Round) -> Ordering
[src]
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
[src]
Performs the addition. Read more
impl<'t> AddAssignRound<&'t f32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn add_assign_round(&mut self, rhs: &'t f32, round: Round) -> Ordering
[src]
Performs the addition. Read more
impl AddFrom<f32> for Float
[src]
impl<'t> AddFrom<&'t f32> for Float
[src]
impl 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
[src]
Performs the addition. Read more
impl<'t> AddFromRound<&'t f32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn add_from_round(&mut self, lhs: &'t f32, round: Round) -> Ordering
[src]
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
[src]
Performs the -
operation.
impl<'t> Sub<&'t f32> for Float
[src]
type Output = Float
The resulting type after applying the -
operator.
fn sub(self, rhs: &'t f32) -> Float
[src]
Performs the -
operation.
impl<'b> Sub<f32> for &'b Float
[src]
type Output = SubF32Incomplete<'b>
The resulting type after applying the -
operator.
fn sub(self, rhs: f32) -> SubF32Incomplete<'b>
[src]
Performs the -
operation.
impl<'t, 'b> Sub<&'t f32> for &'b Float
[src]
type Output = SubF32Incomplete<'b>
The resulting type after applying the -
operator.
fn sub(self, rhs: &'t f32) -> SubF32Incomplete<'b>
[src]
Performs the -
operation.
impl SubAssign<f32> for Float
[src]
fn sub_assign(&mut self, rhs: f32)
[src]
Performs the -=
operation.
impl<'t> SubAssign<&'t f32> for Float
[src]
fn sub_assign(&mut self, rhs: &'t f32)
[src]
Performs the -=
operation.
impl<'a> AssignRound<SubF32Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SubF32Incomplete<'a>, round: Round) -> Ordering
[src]
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
[src]
Performs the subtraction. Read more
impl<'t> SubAssignRound<&'t f32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn sub_assign_round(&mut self, rhs: &'t f32, round: Round) -> Ordering
[src]
Performs the subtraction. Read more
impl SubFrom<f32> for Float
[src]
impl<'t> SubFrom<&'t f32> for Float
[src]
impl 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
[src]
Performs the subtraction. Read more
impl<'t> SubFromRound<&'t f32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn sub_from_round(&mut self, lhs: &'t f32, round: Round) -> Ordering
[src]
Performs the subtraction. Read more
impl<'a> AssignRound<SubFromF32Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: SubFromF32Incomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: SubFromF32Incomplete<'a>,
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
[src]
Performs the *
operation.
impl<'t> Mul<&'t f32> for Float
[src]
type Output = Float
The resulting type after applying the *
operator.
fn mul(self, rhs: &'t f32) -> Float
[src]
Performs the *
operation.
impl<'b> Mul<f32> for &'b Float
[src]
type Output = MulF32Incomplete<'b>
The resulting type after applying the *
operator.
fn mul(self, rhs: f32) -> MulF32Incomplete<'b>
[src]
Performs the *
operation.
impl<'t, 'b> Mul<&'t f32> for &'b Float
[src]
type Output = MulF32Incomplete<'b>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'t f32) -> MulF32Incomplete<'b>
[src]
Performs the *
operation.
impl MulAssign<f32> for Float
[src]
fn mul_assign(&mut self, rhs: f32)
[src]
Performs the *=
operation.
impl<'t> MulAssign<&'t f32> for Float
[src]
fn mul_assign(&mut self, rhs: &'t f32)
[src]
Performs the *=
operation.
impl<'a> AssignRound<MulF32Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: MulF32Incomplete<'a>, round: Round) -> Ordering
[src]
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
[src]
Performs the multiplication. Read more
impl<'t> MulAssignRound<&'t f32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn mul_assign_round(&mut self, rhs: &'t f32, round: Round) -> Ordering
[src]
Performs the multiplication. Read more
impl MulFrom<f32> for Float
[src]
impl<'t> MulFrom<&'t f32> for Float
[src]
impl 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
[src]
Performs the multiplication. Read more
impl<'t> MulFromRound<&'t f32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn mul_from_round(&mut self, lhs: &'t f32, round: Round) -> Ordering
[src]
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
[src]
Performs the /
operation.
impl<'t> Div<&'t f32> for Float
[src]
type Output = Float
The resulting type after applying the /
operator.
fn div(self, rhs: &'t f32) -> Float
[src]
Performs the /
operation.
impl<'b> Div<f32> for &'b Float
[src]
type Output = DivF32Incomplete<'b>
The resulting type after applying the /
operator.
fn div(self, rhs: f32) -> DivF32Incomplete<'b>
[src]
Performs the /
operation.
impl<'t, 'b> Div<&'t f32> for &'b Float
[src]
type Output = DivF32Incomplete<'b>
The resulting type after applying the /
operator.
fn div(self, rhs: &'t f32) -> DivF32Incomplete<'b>
[src]
Performs the /
operation.
impl DivAssign<f32> for Float
[src]
fn div_assign(&mut self, rhs: f32)
[src]
Performs the /=
operation.
impl<'t> DivAssign<&'t f32> for Float
[src]
fn div_assign(&mut self, rhs: &'t f32)
[src]
Performs the /=
operation.
impl<'a> AssignRound<DivF32Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: DivF32Incomplete<'a>, round: Round) -> Ordering
[src]
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
[src]
Performs the division. Read more
impl<'t> DivAssignRound<&'t f32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn div_assign_round(&mut self, rhs: &'t f32, round: Round) -> Ordering
[src]
Performs the division. Read more
impl DivFrom<f32> for Float
[src]
impl<'t> DivFrom<&'t f32> for Float
[src]
impl 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
[src]
Performs the division. Read more
impl<'t> DivFromRound<&'t f32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn div_from_round(&mut self, lhs: &'t f32, round: Round) -> Ordering
[src]
Performs the division. Read more
impl<'a> AssignRound<DivFromF32Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: DivFromF32Incomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: DivFromF32Incomplete<'a>,
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
[src]
Performs the +
operation.
impl<'t> Add<&'t f64> for Float
[src]
type Output = Float
The resulting type after applying the +
operator.
fn add(self, rhs: &'t f64) -> Float
[src]
Performs the +
operation.
impl<'b> Add<f64> for &'b Float
[src]
type Output = AddF64Incomplete<'b>
The resulting type after applying the +
operator.
fn add(self, rhs: f64) -> AddF64Incomplete<'b>
[src]
Performs the +
operation.
impl<'t, 'b> Add<&'t f64> for &'b Float
[src]
type Output = AddF64Incomplete<'b>
The resulting type after applying the +
operator.
fn add(self, rhs: &'t f64) -> AddF64Incomplete<'b>
[src]
Performs the +
operation.
impl AddAssign<f64> for Float
[src]
fn add_assign(&mut self, rhs: f64)
[src]
Performs the +=
operation.
impl<'t> AddAssign<&'t f64> for Float
[src]
fn add_assign(&mut self, rhs: &'t f64)
[src]
Performs the +=
operation.
impl<'a> AssignRound<AddF64Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AddF64Incomplete<'a>, round: Round) -> Ordering
[src]
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
[src]
Performs the addition. Read more
impl<'t> AddAssignRound<&'t f64> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn add_assign_round(&mut self, rhs: &'t f64, round: Round) -> Ordering
[src]
Performs the addition. Read more
impl AddFrom<f64> for Float
[src]
impl<'t> AddFrom<&'t f64> for Float
[src]
impl 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
[src]
Performs the addition. Read more
impl<'t> AddFromRound<&'t f64> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn add_from_round(&mut self, lhs: &'t f64, round: Round) -> Ordering
[src]
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
[src]
Performs the -
operation.
impl<'t> Sub<&'t f64> for Float
[src]
type Output = Float
The resulting type after applying the -
operator.
fn sub(self, rhs: &'t f64) -> Float
[src]
Performs the -
operation.
impl<'b> Sub<f64> for &'b Float
[src]
type Output = SubF64Incomplete<'b>
The resulting type after applying the -
operator.
fn sub(self, rhs: f64) -> SubF64Incomplete<'b>
[src]
Performs the -
operation.
impl<'t, 'b> Sub<&'t f64> for &'b Float
[src]
type Output = SubF64Incomplete<'b>
The resulting type after applying the -
operator.
fn sub(self, rhs: &'t f64) -> SubF64Incomplete<'b>
[src]
Performs the -
operation.
impl SubAssign<f64> for Float
[src]
fn sub_assign(&mut self, rhs: f64)
[src]
Performs the -=
operation.
impl<'t> SubAssign<&'t f64> for Float
[src]
fn sub_assign(&mut self, rhs: &'t f64)
[src]
Performs the -=
operation.
impl<'a> AssignRound<SubF64Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SubF64Incomplete<'a>, round: Round) -> Ordering
[src]
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
[src]
Performs the subtraction. Read more
impl<'t> SubAssignRound<&'t f64> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn sub_assign_round(&mut self, rhs: &'t f64, round: Round) -> Ordering
[src]
Performs the subtraction. Read more
impl SubFrom<f64> for Float
[src]
impl<'t> SubFrom<&'t f64> for Float
[src]
impl 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
[src]
Performs the subtraction. Read more
impl<'t> SubFromRound<&'t f64> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn sub_from_round(&mut self, lhs: &'t f64, round: Round) -> Ordering
[src]
Performs the subtraction. Read more
impl<'a> AssignRound<SubFromF64Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: SubFromF64Incomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: SubFromF64Incomplete<'a>,
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
[src]
Performs the *
operation.
impl<'t> Mul<&'t f64> for Float
[src]
type Output = Float
The resulting type after applying the *
operator.
fn mul(self, rhs: &'t f64) -> Float
[src]
Performs the *
operation.
impl<'b> Mul<f64> for &'b Float
[src]
type Output = MulF64Incomplete<'b>
The resulting type after applying the *
operator.
fn mul(self, rhs: f64) -> MulF64Incomplete<'b>
[src]
Performs the *
operation.
impl<'t, 'b> Mul<&'t f64> for &'b Float
[src]
type Output = MulF64Incomplete<'b>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'t f64) -> MulF64Incomplete<'b>
[src]
Performs the *
operation.
impl MulAssign<f64> for Float
[src]
fn mul_assign(&mut self, rhs: f64)
[src]
Performs the *=
operation.
impl<'t> MulAssign<&'t f64> for Float
[src]
fn mul_assign(&mut self, rhs: &'t f64)
[src]
Performs the *=
operation.
impl<'a> AssignRound<MulF64Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: MulF64Incomplete<'a>, round: Round) -> Ordering
[src]
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
[src]
Performs the multiplication. Read more
impl<'t> MulAssignRound<&'t f64> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn mul_assign_round(&mut self, rhs: &'t f64, round: Round) -> Ordering
[src]
Performs the multiplication. Read more
impl MulFrom<f64> for Float
[src]
impl<'t> MulFrom<&'t f64> for Float
[src]
impl 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
[src]
Performs the multiplication. Read more
impl<'t> MulFromRound<&'t f64> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn mul_from_round(&mut self, lhs: &'t f64, round: Round) -> Ordering
[src]
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
[src]
Performs the /
operation.
impl<'t> Div<&'t f64> for Float
[src]
type Output = Float
The resulting type after applying the /
operator.
fn div(self, rhs: &'t f64) -> Float
[src]
Performs the /
operation.
impl<'b> Div<f64> for &'b Float
[src]
type Output = DivF64Incomplete<'b>
The resulting type after applying the /
operator.
fn div(self, rhs: f64) -> DivF64Incomplete<'b>
[src]
Performs the /
operation.
impl<'t, 'b> Div<&'t f64> for &'b Float
[src]
type Output = DivF64Incomplete<'b>
The resulting type after applying the /
operator.
fn div(self, rhs: &'t f64) -> DivF64Incomplete<'b>
[src]
Performs the /
operation.
impl DivAssign<f64> for Float
[src]
fn div_assign(&mut self, rhs: f64)
[src]
Performs the /=
operation.
impl<'t> DivAssign<&'t f64> for Float
[src]
fn div_assign(&mut self, rhs: &'t f64)
[src]
Performs the /=
operation.
impl<'a> AssignRound<DivF64Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: DivF64Incomplete<'a>, round: Round) -> Ordering
[src]
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
[src]
Performs the division. Read more
impl<'t> DivAssignRound<&'t f64> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn div_assign_round(&mut self, rhs: &'t f64, round: Round) -> Ordering
[src]
Performs the division. Read more
impl DivFrom<f64> for Float
[src]
impl<'t> DivFrom<&'t f64> for Float
[src]
impl 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
[src]
Performs the division. Read more
impl<'t> DivFromRound<&'t f64> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn div_from_round(&mut self, lhs: &'t f64, round: Round) -> Ordering
[src]
Performs the division. Read more
impl<'a> AssignRound<DivFromF64Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: DivFromF64Incomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: DivFromF64Incomplete<'a>,
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
[src]
Performs the <<
operation.
impl<'t> Shl<&'t u32> for Float
[src]
type Output = Float
The resulting type after applying the <<
operator.
fn shl(self, rhs: &'t u32) -> Float
[src]
Performs the <<
operation.
impl<'b> Shl<u32> for &'b Float
[src]
type Output = ShlU32Incomplete<'b>
The resulting type after applying the <<
operator.
fn shl(self, rhs: u32) -> ShlU32Incomplete<'b>
[src]
Performs the <<
operation.
impl<'t, 'b> Shl<&'t u32> for &'b Float
[src]
type Output = ShlU32Incomplete<'b>
The resulting type after applying the <<
operator.
fn shl(self, rhs: &'t u32) -> ShlU32Incomplete<'b>
[src]
Performs the <<
operation.
impl ShlAssign<u32> for Float
[src]
fn shl_assign(&mut self, rhs: u32)
[src]
Performs the <<=
operation.
impl<'t> ShlAssign<&'t u32> for Float
[src]
fn shl_assign(&mut self, rhs: &'t u32)
[src]
Performs the <<=
operation.
impl<'a> AssignRound<ShlU32Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: ShlU32Incomplete<'a>, round: Round) -> Ordering
[src]
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
[src]
Performs the >>
operation.
impl<'t> Shr<&'t u32> for Float
[src]
type Output = Float
The resulting type after applying the >>
operator.
fn shr(self, rhs: &'t u32) -> Float
[src]
Performs the >>
operation.
impl<'b> Shr<u32> for &'b Float
[src]
type Output = ShrU32Incomplete<'b>
The resulting type after applying the >>
operator.
fn shr(self, rhs: u32) -> ShrU32Incomplete<'b>
[src]
Performs the >>
operation.
impl<'t, 'b> Shr<&'t u32> for &'b Float
[src]
type Output = ShrU32Incomplete<'b>
The resulting type after applying the >>
operator.
fn shr(self, rhs: &'t u32) -> ShrU32Incomplete<'b>
[src]
Performs the >>
operation.
impl ShrAssign<u32> for Float
[src]
fn shr_assign(&mut self, rhs: u32)
[src]
Performs the >>=
operation.
impl<'t> ShrAssign<&'t u32> for Float
[src]
fn shr_assign(&mut self, rhs: &'t u32)
[src]
Performs the >>=
operation.
impl<'a> AssignRound<ShrU32Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: ShrU32Incomplete<'a>, round: Round) -> Ordering
[src]
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
[src]
Performs the power operation. Read more
impl<'t> Pow<&'t u32> for Float
[src]
type Output = Float
The resulting type after the power operation.
fn pow(self, rhs: &'t u32) -> Float
[src]
Performs the power operation. Read more
impl<'b> Pow<u32> for &'b Float
[src]
type Output = PowU32Incomplete<'b>
The resulting type after the power operation.
fn pow(self, rhs: u32) -> PowU32Incomplete<'b>
[src]
Performs the power operation. Read more
impl<'t, 'b> Pow<&'t u32> for &'b Float
[src]
type Output = PowU32Incomplete<'b>
The resulting type after the power operation.
fn pow(self, rhs: &'t u32) -> PowU32Incomplete<'b>
[src]
Performs the power operation. Read more
impl PowAssign<u32> for Float
[src]
fn pow_assign(&mut self, rhs: u32)
[src]
Peforms the power operation. Read more
impl<'t> PowAssign<&'t u32> for Float
[src]
fn pow_assign(&mut self, rhs: &'t u32)
[src]
Peforms the power operation. Read more
impl<'a> AssignRound<PowU32Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: PowU32Incomplete<'a>, round: Round) -> Ordering
[src]
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
[src]
Performs the power operation. Read more
impl<'t> PowAssignRound<&'t u32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn pow_assign_round(&mut self, rhs: &'t u32, round: Round) -> Ordering
[src]
Performs the power operation. Read more
impl PowFrom<u32> for Float
[src]
impl<'t> PowFrom<&'t u32> for Float
[src]
impl 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
[src]
Performs the power operation. Read more
impl<'t> PowFromRound<&'t u32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn pow_from_round(&mut self, lhs: &'t u32, round: Round) -> Ordering
[src]
Performs the power operation. Read more
impl<'a> AssignRound<PowFromU32Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: PowFromU32Incomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: PowFromU32Incomplete<'a>,
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
[src]
Performs the <<
operation.
impl<'t> Shl<&'t i32> for Float
[src]
type Output = Float
The resulting type after applying the <<
operator.
fn shl(self, rhs: &'t i32) -> Float
[src]
Performs the <<
operation.
impl<'b> Shl<i32> for &'b Float
[src]
type Output = ShlI32Incomplete<'b>
The resulting type after applying the <<
operator.
fn shl(self, rhs: i32) -> ShlI32Incomplete<'b>
[src]
Performs the <<
operation.
impl<'t, 'b> Shl<&'t i32> for &'b Float
[src]
type Output = ShlI32Incomplete<'b>
The resulting type after applying the <<
operator.
fn shl(self, rhs: &'t i32) -> ShlI32Incomplete<'b>
[src]
Performs the <<
operation.
impl ShlAssign<i32> for Float
[src]
fn shl_assign(&mut self, rhs: i32)
[src]
Performs the <<=
operation.
impl<'t> ShlAssign<&'t i32> for Float
[src]
fn shl_assign(&mut self, rhs: &'t i32)
[src]
Performs the <<=
operation.
impl<'a> AssignRound<ShlI32Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: ShlI32Incomplete<'a>, round: Round) -> Ordering
[src]
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
[src]
Performs the >>
operation.
impl<'t> Shr<&'t i32> for Float
[src]
type Output = Float
The resulting type after applying the >>
operator.
fn shr(self, rhs: &'t i32) -> Float
[src]
Performs the >>
operation.
impl<'b> Shr<i32> for &'b Float
[src]
type Output = ShrI32Incomplete<'b>
The resulting type after applying the >>
operator.
fn shr(self, rhs: i32) -> ShrI32Incomplete<'b>
[src]
Performs the >>
operation.
impl<'t, 'b> Shr<&'t i32> for &'b Float
[src]
type Output = ShrI32Incomplete<'b>
The resulting type after applying the >>
operator.
fn shr(self, rhs: &'t i32) -> ShrI32Incomplete<'b>
[src]
Performs the >>
operation.
impl ShrAssign<i32> for Float
[src]
fn shr_assign(&mut self, rhs: i32)
[src]
Performs the >>=
operation.
impl<'t> ShrAssign<&'t i32> for Float
[src]
fn shr_assign(&mut self, rhs: &'t i32)
[src]
Performs the >>=
operation.
impl<'a> AssignRound<ShrI32Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: ShrI32Incomplete<'a>, round: Round) -> Ordering
[src]
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
[src]
Performs the power operation. Read more
impl<'t> Pow<&'t i32> for Float
[src]
type Output = Float
The resulting type after the power operation.
fn pow(self, rhs: &'t i32) -> Float
[src]
Performs the power operation. Read more
impl<'b> Pow<i32> for &'b Float
[src]
type Output = PowI32Incomplete<'b>
The resulting type after the power operation.
fn pow(self, rhs: i32) -> PowI32Incomplete<'b>
[src]
Performs the power operation. Read more
impl<'t, 'b> Pow<&'t i32> for &'b Float
[src]
type Output = PowI32Incomplete<'b>
The resulting type after the power operation.
fn pow(self, rhs: &'t i32) -> PowI32Incomplete<'b>
[src]
Performs the power operation. Read more
impl PowAssign<i32> for Float
[src]
fn pow_assign(&mut self, rhs: i32)
[src]
Peforms the power operation. Read more
impl<'t> PowAssign<&'t i32> for Float
[src]
fn pow_assign(&mut self, rhs: &'t i32)
[src]
Peforms the power operation. Read more
impl<'a> AssignRound<PowI32Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: PowI32Incomplete<'a>, round: Round) -> Ordering
[src]
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
[src]
Performs the power operation. Read more
impl<'t> PowAssignRound<&'t i32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn pow_assign_round(&mut self, rhs: &'t i32, round: Round) -> Ordering
[src]
Performs the power operation. Read more
impl PowFrom<i32> for Float
[src]
impl<'t> PowFrom<&'t i32> for Float
[src]
impl 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
[src]
Performs the power operation. Read more
impl<'t> PowFromRound<&'t i32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn pow_from_round(&mut self, lhs: &'t i32, round: Round) -> Ordering
[src]
Performs the power operation. Read more
impl<'a> AssignRound<PowFromI32Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: PowFromI32Incomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: PowFromI32Incomplete<'a>,
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
[src]
Performs the power operation. Read more
impl<'t> Pow<&'t f64> for Float
[src]
type Output = Float
The resulting type after the power operation.
fn pow(self, rhs: &'t f64) -> Float
[src]
Performs the power operation. Read more
impl<'b> Pow<f64> for &'b Float
[src]
type Output = PowF64Incomplete<'b>
The resulting type after the power operation.
fn pow(self, rhs: f64) -> PowF64Incomplete<'b>
[src]
Performs the power operation. Read more
impl<'t, 'b> Pow<&'t f64> for &'b Float
[src]
type Output = PowF64Incomplete<'b>
The resulting type after the power operation.
fn pow(self, rhs: &'t f64) -> PowF64Incomplete<'b>
[src]
Performs the power operation. Read more
impl PowAssign<f64> for Float
[src]
fn pow_assign(&mut self, rhs: f64)
[src]
Peforms the power operation. Read more
impl<'t> PowAssign<&'t f64> for Float
[src]
fn pow_assign(&mut self, rhs: &'t f64)
[src]
Peforms the power operation. Read more
impl<'a> AssignRound<PowF64Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: PowF64Incomplete<'a>, round: Round) -> Ordering
[src]
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
[src]
Performs the power operation. Read more
impl<'t> PowAssignRound<&'t f64> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn pow_assign_round(&mut self, rhs: &'t f64, round: Round) -> Ordering
[src]
Performs the power operation. Read more
impl PowFrom<f64> for Float
[src]
impl<'t> PowFrom<&'t f64> for Float
[src]
impl 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
[src]
Performs the power operation. Read more
impl<'t> PowFromRound<&'t f64> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn pow_from_round(&mut self, lhs: &'t f64, round: Round) -> Ordering
[src]
Performs the power operation. Read more
impl<'a> AssignRound<PowFromF64Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: PowFromF64Incomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: PowFromF64Incomplete<'a>,
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
[src]
Performs the power operation. Read more
impl<'t> Pow<&'t f32> for Float
[src]
type Output = Float
The resulting type after the power operation.
fn pow(self, rhs: &'t f32) -> Float
[src]
Performs the power operation. Read more
impl<'b> Pow<f32> for &'b Float
[src]
type Output = PowF32Incomplete<'b>
The resulting type after the power operation.
fn pow(self, rhs: f32) -> PowF32Incomplete<'b>
[src]
Performs the power operation. Read more
impl<'t, 'b> Pow<&'t f32> for &'b Float
[src]
type Output = PowF32Incomplete<'b>
The resulting type after the power operation.
fn pow(self, rhs: &'t f32) -> PowF32Incomplete<'b>
[src]
Performs the power operation. Read more
impl PowAssign<f32> for Float
[src]
fn pow_assign(&mut self, rhs: f32)
[src]
Peforms the power operation. Read more
impl<'t> PowAssign<&'t f32> for Float
[src]
fn pow_assign(&mut self, rhs: &'t f32)
[src]
Peforms the power operation. Read more
impl<'a> AssignRound<PowF32Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: PowF32Incomplete<'a>, round: Round) -> Ordering
[src]
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
[src]
Performs the power operation. Read more
impl<'t> PowAssignRound<&'t f32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn pow_assign_round(&mut self, rhs: &'t f32, round: Round) -> Ordering
[src]
Performs the power operation. Read more
impl PowFrom<f32> for Float
[src]
impl<'t> PowFrom<&'t f32> for Float
[src]
impl 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
[src]
Performs the power operation. Read more
impl<'t> PowFromRound<&'t f32> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn pow_from_round(&mut self, lhs: &'t f32, round: Round) -> Ordering
[src]
Performs the power operation. Read more
impl<'a> AssignRound<PowFromF32Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: PowFromF32Incomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: PowFromF32Incomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a> Add<MulIncomplete<'a>> for Float
[src]
type Output = Float
The resulting type after applying the +
operator.
fn add(self, rhs: MulIncomplete) -> Float
[src]
Performs the +
operation.
impl<'a> Add<MulIncomplete<'a>> for &'a Float
[src]
type Output = AddMulIncomplete<'a>
The resulting type after applying the +
operator.
fn add(self, rhs: MulIncomplete<'a>) -> AddMulIncomplete<'a>
[src]
Performs the +
operation.
impl<'a> AddAssign<MulIncomplete<'a>> for Float
[src]
fn add_assign(&mut self, rhs: MulIncomplete)
[src]
Performs the +=
operation.
impl<'a> AddAssignRound<MulIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn add_assign_round(&mut self, rhs: MulIncomplete, round: Round) -> Ordering
[src]
Performs the addition. Read more
impl<'a> AssignRound<AddMulIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AddMulIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AddFrom<MulIncomplete<'a>> for Float
[src]
impl<'a> AddFromRound<MulIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn add_from_round(&mut self, lhs: MulIncomplete, round: Round) -> Ordering
[src]
Performs the addition. Read more
impl<'a> Sub<MulIncomplete<'a>> for Float
[src]
type Output = Float
The resulting type after applying the -
operator.
fn sub(self, rhs: MulIncomplete) -> Float
[src]
Performs the -
operation.
impl<'a> Sub<MulIncomplete<'a>> for &'a Float
[src]
type Output = SubMulIncomplete<'a>
The resulting type after applying the -
operator.
fn sub(self, rhs: MulIncomplete<'a>) -> SubMulIncomplete<'a>
[src]
Performs the -
operation.
impl<'a> SubAssign<MulIncomplete<'a>> for Float
[src]
fn sub_assign(&mut self, rhs: MulIncomplete)
[src]
Performs the -=
operation.
impl<'a> SubAssignRound<MulIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn sub_assign_round(&mut self, rhs: MulIncomplete, round: Round) -> Ordering
[src]
Performs the subtraction. Read more
impl<'a> AssignRound<SubMulIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SubMulIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> SubFrom<MulIncomplete<'a>> for Float
[src]
impl<'a> SubFromRound<MulIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn sub_from_round(&mut self, lhs: MulIncomplete, round: Round) -> Ordering
[src]
Performs the subtraction. Read more
impl<'a> AssignRound<SubMulFromIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: SubMulFromIncomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: SubMulFromIncomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<MulAddMulIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: MulAddMulIncomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: MulAddMulIncomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<MulSubMulIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: MulSubMulIncomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: MulSubMulIncomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a, I> AssignRound<SumIncomplete<'a, I>> for Float where
I: Iterator<Item = &'a Self>,
[src]
I: Iterator<Item = &'a Self>,
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SumIncomplete<'a, I>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a, I> Add<SumIncomplete<'a, I>> for Float where
I: Iterator<Item = &'a Self>,
[src]
I: Iterator<Item = &'a Self>,
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: SumIncomplete<'a, I>) -> Self
[src]
Performs the +
operation.
impl<'a, I> AddAssign<SumIncomplete<'a, I>> for Float where
I: Iterator<Item = &'a Self>,
[src]
I: Iterator<Item = &'a Self>,
fn add_assign(&mut self, rhs: SumIncomplete<'a, I>)
[src]
Performs the +=
operation.
impl<'a, I> AddAssignRound<SumIncomplete<'a, I>> for Float where
I: Iterator<Item = &'a Self>,
[src]
I: Iterator<Item = &'a Self>,
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn add_assign_round(
&mut self,
src: SumIncomplete<'a, I>,
round: Round
) -> Ordering
[src]
&mut self,
src: SumIncomplete<'a, I>,
round: Round
) -> Ordering
Performs the addition. Read more
impl<'a> AssignRound<SquareIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SquareIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<SqrtIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SqrtIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl AssignRound<SqrtUIncomplete> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SqrtUIncomplete, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<RecipSqrtIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: RecipSqrtIncomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: RecipSqrtIncomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<CbrtIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: CbrtIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<RootIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: RootIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<AbsIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AbsIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<SignumIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SignumIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a, Min, Max> AssignRound<ClampIncomplete<'a, Min, Max>> for Float where
Self: PartialOrd<Min> + PartialOrd<Max> + AssignRound<&'a Min, Round = Round, Ordering = Ordering> + AssignRound<&'a Max, Round = Round, Ordering = Ordering>,
Min: 'a,
Max: 'a,
[src]
Self: PartialOrd<Min> + PartialOrd<Max> + AssignRound<&'a Min, Round = Round, Ordering = Ordering> + AssignRound<&'a Max, Round = Round, Ordering = Ordering>,
Min: 'a,
Max: 'a,
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: ClampIncomplete<'a, Min, Max>,
round: Round
) -> Ordering
[src]
&mut self,
src: ClampIncomplete<'a, Min, Max>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<RecipIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: RecipIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<MinIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: MinIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<MaxIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: MaxIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<PositiveDiffIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: PositiveDiffIncomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: PositiveDiffIncomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<LnIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: LnIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl AssignRound<LnUIncomplete> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: LnUIncomplete, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<Log2Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: Log2Incomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<Log10Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: Log10Incomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<ExpIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: ExpIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<Exp2Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: Exp2Incomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<Exp10Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: Exp10Incomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<SinIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SinIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<CosIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: CosIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<TanIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: TanIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<SecIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SecIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<CscIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: CscIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<CotIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: CotIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<AcosIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AcosIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<AsinIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AsinIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<AtanIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AtanIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<Atan2Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: Atan2Incomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<CoshIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: CoshIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<SinhIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SinhIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<TanhIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: TanhIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<SechIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: SechIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<CschIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: CschIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<CothIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: CothIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<AcoshIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AcoshIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<AsinhIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AsinhIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<AtanhIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AtanhIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl AssignRound<FactorialIncomplete> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: FactorialIncomplete, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<Ln1pIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: Ln1pIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<ExpM1Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: ExpM1Incomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<EintIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: EintIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<Li2Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: Li2Incomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<GammaIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: GammaIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<GammaIncIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: GammaIncIncomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: GammaIncIncomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<LnGammaIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: LnGammaIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<DigammaIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: DigammaIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<ZetaIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: ZetaIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl AssignRound<ZetaUIncomplete> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: ZetaUIncomplete, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<ErfIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: ErfIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<ErfcIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: ErfcIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<J0Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: J0Incomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<J1Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: J1Incomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<JnIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: JnIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<Y0Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: Y0Incomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<Y1Incomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: Y1Incomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<YnIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: YnIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<AgmIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AgmIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<HypotIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: HypotIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<AiIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AiIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<CeilIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: CeilIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<FloorIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: FloorIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<RoundIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: RoundIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<RoundEvenIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: RoundEvenIncomplete<'a>,
round: Round
) -> Ordering
[src]
&mut self,
src: RoundEvenIncomplete<'a>,
round: Round
) -> Ordering
Peforms the assignment. Read more
impl<'a> AssignRound<TruncIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: TruncIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<FractIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: FractIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a, 'b: 'a, 'c> Assign<RandomBitsIncomplete<'a, 'b>> for Float
[src]
impl<'a, 'b: 'a> AssignRound<RandomCont<'a, 'b>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: RandomCont<'a, 'b>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a, 'b: 'a> AssignRound<RandomNormal<'a, 'b>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: RandomNormal<'a, 'b>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a, 'b: 'a> AssignRound<RandomExp<'a, 'b>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: RandomExp<'a, 'b>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl AssignRound<ParseIncomplete> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: ParseIncomplete, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl PartialEq for Float
[src]
fn eq(&self, other: &Float) -> bool
[src]
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[src]
This method tests for !=
.
impl PartialOrd for Float
[src]
fn partial_cmp(&self, other: &Float) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Float) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Float) -> bool
[src]
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
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Float) -> bool
[src]
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
[src]
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[src]
This method tests for !=
.
impl PartialOrd<Integer> for Float
[src]
fn partial_cmp(&self, other: &Integer) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
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[src]
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[src]
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[src]
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
[src]
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[src]
This method tests for !=
.
impl PartialOrd<Rational> for Float
[src]
fn partial_cmp(&self, other: &Rational) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
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[src]
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[src]
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[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl PartialEq<i8> for Float
[src]
fn eq(&self, other: &i8) -> bool
[src]
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[src]
This method tests for !=
.
impl PartialOrd<i8> for Float
[src]
fn partial_cmp(&self, other: &i8) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
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[src]
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[src]
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[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl PartialEq<i16> for Float
[src]
fn eq(&self, other: &i16) -> bool
[src]
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[src]
This method tests for !=
.
impl PartialOrd<i16> for Float
[src]
fn partial_cmp(&self, other: &i16) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
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[src]
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[src]
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[src]
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
[src]
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[src]
This method tests for !=
.
impl PartialOrd<i32> for Float
[src]
fn partial_cmp(&self, other: &i32) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
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[src]
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[src]
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[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl PartialEq<i64> for Float
[src]
fn eq(&self, other: &i64) -> bool
[src]
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[src]
This method tests for !=
.
impl PartialOrd<i64> for Float
[src]
fn partial_cmp(&self, other: &i64) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
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[src]
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[src]
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[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl PartialEq<isize> for Float
[src]
fn eq(&self, other: &isize) -> bool
[src]
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[src]
This method tests for !=
.
impl PartialOrd<isize> for Float
[src]
fn partial_cmp(&self, other: &isize) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
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[src]
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[src]
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[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl PartialEq<u8> for Float
[src]
fn eq(&self, other: &u8) -> bool
[src]
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[src]
This method tests for !=
.
impl PartialOrd<u8> for Float
[src]
fn partial_cmp(&self, other: &u8) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
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[src]
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[src]
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[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl PartialEq<u16> for Float
[src]
fn eq(&self, other: &u16) -> bool
[src]
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[src]
This method tests for !=
.
impl PartialOrd<u16> for Float
[src]
fn partial_cmp(&self, other: &u16) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
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[src]
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[src]
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[src]
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
[src]
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[src]
This method tests for !=
.
impl PartialOrd<u32> for Float
[src]
fn partial_cmp(&self, other: &u32) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
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[src]
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[src]
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[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl PartialEq<u64> for Float
[src]
fn eq(&self, other: &u64) -> bool
[src]
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[src]
This method tests for !=
.
impl PartialOrd<u64> for Float
[src]
fn partial_cmp(&self, other: &u64) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
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[src]
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[src]
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[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl PartialEq<usize> for Float
[src]
fn eq(&self, other: &usize) -> bool
[src]
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[src]
This method tests for !=
.
impl PartialOrd<usize> for Float
[src]
fn partial_cmp(&self, other: &usize) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
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[src]
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[src]
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[src]
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
[src]
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[src]
This method tests for !=
.
impl PartialOrd<f32> for Float
[src]
fn partial_cmp(&self, other: &f32) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
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[src]
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[src]
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[src]
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
[src]
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[src]
This method tests for !=
.
impl PartialOrd<f64> for Float
[src]
fn partial_cmp(&self, other: &f64) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
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[src]
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[src]
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[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl PartialEq<Special> for Float
[src]
fn eq(&self, other: &Special) -> bool
[src]
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[src]
This method tests for !=
.
impl PartialOrd<Special> for Float
[src]
fn partial_cmp(&self, other: &Special) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
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[src]
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[src]
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[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl From<OrdFloat> for Float
[src]
impl Serialize for Float
[src]
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
[src]
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<'de> Deserialize<'de> for Float
[src]
fn deserialize<D>(deserializer: D) -> Result<Float, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
fn deserialize_in_place<D>(
deserializer: D,
place: &mut Float
) -> Result<(), D::Error> where
D: Deserializer<'de>,
[src]
deserializer: D,
place: &mut Float
) -> Result<(), D::Error> where
D: Deserializer<'de>,
impl Clone for Float
[src]
fn clone(&self) -> Float
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Float)
[src]
Performs copy-assignment from source
. Read more
impl Drop for Float
[src]
impl Display for Float
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
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
Self: AssignRound<T, Round = Round, Ordering = Ordering>,
[src]
Self: 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, src: Constant, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<&'a Constant> for Float
[src]
type Round = <Float as AssignRound<Constant>>::Round
The rounding method.
type Ordering = <Float as AssignRound<Constant>>::Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: &'a Constant,
round: Self::Round
) -> Self::Ordering
[src]
&mut self,
src: &'a Constant,
round: Self::Round
) -> Self::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, src: Special, _round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<&'a Special> for Float
[src]
type Round = <Float as AssignRound<Special>>::Round
The rounding method.
type Ordering = <Float as AssignRound<Special>>::Ordering
The direction from rounding.
fn assign_round(
&mut self,
src: &'a Special,
round: Self::Round
) -> Self::Ordering
[src]
&mut self,
src: &'a Special,
round: Self::Round
) -> Self::Ordering
Peforms the assignment. Read more
impl AssignRound for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: Float, round: Round) -> Ordering
[src]
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, src: &'a Float, round: Round) -> Ordering
[src]
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, src: &'a Integer, round: Round) -> Ordering
[src]
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, src: Integer, round: Round) -> Ordering
[src]
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, src: &'a Rational, round: Round) -> Ordering
[src]
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, src: Rational, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl AssignRound<i8> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: i8, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<&'a i8> for Float
[src]
type Round = <Float as AssignRound<i8>>::Round
The rounding method.
type Ordering = <Float as AssignRound<i8>>::Ordering
The direction from rounding.
fn assign_round(&mut self, src: &'a i8, round: Self::Round) -> Self::Ordering
[src]
Peforms the assignment. Read more
impl AssignRound<i16> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: i16, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<&'a i16> for Float
[src]
type Round = <Float as AssignRound<i16>>::Round
The rounding method.
type Ordering = <Float as AssignRound<i16>>::Ordering
The direction from rounding.
fn assign_round(&mut self, src: &'a i16, round: Self::Round) -> Self::Ordering
[src]
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, src: i32, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<&'a i32> for Float
[src]
type Round = <Float as AssignRound<i32>>::Round
The rounding method.
type Ordering = <Float as AssignRound<i32>>::Ordering
The direction from rounding.
fn assign_round(&mut self, src: &'a i32, round: Self::Round) -> Self::Ordering
[src]
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, src: i64, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<&'a i64> for Float
[src]
type Round = <Float as AssignRound<i64>>::Round
The rounding method.
type Ordering = <Float as AssignRound<i64>>::Ordering
The direction from rounding.
fn assign_round(&mut self, src: &'a i64, round: Self::Round) -> Self::Ordering
[src]
Peforms the assignment. Read more
impl AssignRound<isize> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: isize, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<&'a isize> for Float
[src]
type Round = <Float as AssignRound<isize>>::Round
The rounding method.
type Ordering = <Float as AssignRound<isize>>::Ordering
The direction from rounding.
fn assign_round(&mut self, src: &'a isize, round: Self::Round) -> Self::Ordering
[src]
Peforms the assignment. Read more
impl AssignRound<u8> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: u8, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<&'a u8> for Float
[src]
type Round = <Float as AssignRound<u8>>::Round
The rounding method.
type Ordering = <Float as AssignRound<u8>>::Ordering
The direction from rounding.
fn assign_round(&mut self, src: &'a u8, round: Self::Round) -> Self::Ordering
[src]
Peforms the assignment. Read more
impl AssignRound<u16> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: u16, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<&'a u16> for Float
[src]
type Round = <Float as AssignRound<u16>>::Round
The rounding method.
type Ordering = <Float as AssignRound<u16>>::Ordering
The direction from rounding.
fn assign_round(&mut self, src: &'a u16, round: Self::Round) -> Self::Ordering
[src]
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, src: u32, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<&'a u32> for Float
[src]
type Round = <Float as AssignRound<u32>>::Round
The rounding method.
type Ordering = <Float as AssignRound<u32>>::Ordering
The direction from rounding.
fn assign_round(&mut self, src: &'a u32, round: Self::Round) -> Self::Ordering
[src]
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, src: u64, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<&'a u64> for Float
[src]
type Round = <Float as AssignRound<u64>>::Round
The rounding method.
type Ordering = <Float as AssignRound<u64>>::Ordering
The direction from rounding.
fn assign_round(&mut self, src: &'a u64, round: Self::Round) -> Self::Ordering
[src]
Peforms the assignment. Read more
impl AssignRound<usize> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: usize, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<&'a usize> for Float
[src]
type Round = <Float as AssignRound<usize>>::Round
The rounding method.
type Ordering = <Float as AssignRound<usize>>::Ordering
The direction from rounding.
fn assign_round(&mut self, src: &'a usize, round: Self::Round) -> Self::Ordering
[src]
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, src: f32, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<&'a f32> for Float
[src]
type Round = <Float as AssignRound<f32>>::Round
The rounding method.
type Ordering = <Float as AssignRound<f32>>::Ordering
The direction from rounding.
fn assign_round(&mut self, src: &'a f32, round: Self::Round) -> Self::Ordering
[src]
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, src: f64, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<&'a f64> for Float
[src]
type Round = <Float as AssignRound<f64>>::Round
The rounding method.
type Ordering = <Float as AssignRound<f64>>::Ordering
The direction from rounding.
fn assign_round(&mut self, src: &'a f64, round: Self::Round) -> Self::Ordering
[src]
Peforms the assignment. Read more
impl Send for Float
[src]
impl Sync for Float
[src]
impl Add<Complex> for Float
[src]
type Output = Complex
The resulting type after applying the +
operator.
fn add(self, rhs: Complex) -> Complex
[src]
Performs the +
operation.
impl<'a> Add<&'a Complex> for Float
[src]
type Output = AddOwnedFloatIncomplete<'a>
The resulting type after applying the +
operator.
fn add(self, rhs: &'a Complex) -> AddOwnedFloatIncomplete<'a>
[src]
Performs the +
operation.
impl<'a> Add<Complex> for &'a Float
[src]
type Output = Complex
The resulting type after applying the +
operator.
fn add(self, rhs: Complex) -> Complex
[src]
Performs the +
operation.
impl<'a> Add<&'a Complex> for &'a Float
[src]
type Output = AddFloatIncomplete<'a>
The resulting type after applying the +
operator.
fn add(self, rhs: &'a Complex) -> AddFloatIncomplete<'a>
[src]
Performs the +
operation.
impl Sub<Complex> for Float
[src]
type Output = Complex
The resulting type after applying the -
operator.
fn sub(self, rhs: Complex) -> Complex
[src]
Performs the -
operation.
impl<'a> Sub<&'a Complex> for Float
[src]
type Output = SubFromOwnedFloatIncomplete<'a>
The resulting type after applying the -
operator.
fn sub(self, rhs: &'a Complex) -> SubFromOwnedFloatIncomplete<'a>
[src]
Performs the -
operation.
impl<'a> Sub<Complex> for &'a Float
[src]
type Output = Complex
The resulting type after applying the -
operator.
fn sub(self, rhs: Complex) -> Complex
[src]
Performs the -
operation.
impl<'a> Sub<&'a Complex> for &'a Float
[src]
type Output = SubOwnedFloatIncomplete<'a>
The resulting type after applying the -
operator.
fn sub(self, rhs: &'a Complex) -> SubOwnedFloatIncomplete<'a>
[src]
Performs the -
operation.
impl Mul<Complex> for Float
[src]
type Output = Complex
The resulting type after applying the *
operator.
fn mul(self, rhs: Complex) -> Complex
[src]
Performs the *
operation.
impl<'a> Mul<&'a Complex> for Float
[src]
type Output = MulOwnedFloatIncomplete<'a>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'a Complex) -> MulOwnedFloatIncomplete<'a>
[src]
Performs the *
operation.
impl<'a> Mul<Complex> for &'a Float
[src]
type Output = Complex
The resulting type after applying the *
operator.
fn mul(self, rhs: Complex) -> Complex
[src]
Performs the *
operation.
impl<'a> Mul<&'a Complex> for &'a Float
[src]
type Output = MulFloatIncomplete<'a>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'a Complex) -> MulFloatIncomplete<'a>
[src]
Performs the *
operation.
impl Div<Complex> for Float
[src]
type Output = Complex
The resulting type after applying the /
operator.
fn div(self, rhs: Complex) -> Complex
[src]
Performs the /
operation.
impl<'a> Div<&'a Complex> for Float
[src]
type Output = DivFromOwnedFloatIncomplete<'a>
The resulting type after applying the /
operator.
fn div(self, rhs: &'a Complex) -> DivFromOwnedFloatIncomplete<'a>
[src]
Performs the /
operation.
impl<'a> Div<Complex> for &'a Float
[src]
type Output = Complex
The resulting type after applying the /
operator.
fn div(self, rhs: Complex) -> Complex
[src]
Performs the /
operation.
impl<'a> Div<&'a Complex> for &'a Float
[src]
type Output = DivOwnedFloatIncomplete<'a>
The resulting type after applying the /
operator.
fn div(self, rhs: &'a Complex) -> DivOwnedFloatIncomplete<'a>
[src]
Performs the /
operation.
impl<'a> AssignRound<AbsIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: AbsIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<ArgIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: ArgIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more
impl<'a> AssignRound<NormIncomplete<'a>> for Float
[src]
type Round = Round
The rounding method.
type Ordering = Ordering
The direction from rounding.
fn assign_round(&mut self, src: NormIncomplete<'a>, round: Round) -> Ordering
[src]
Peforms the assignment. Read more