Struct float::Float [] [src]

pub struct Float {
    // some fields omitted
}

Methods

impl Float

fn sqrt(self) -> Float

impl Float

fn zero(p: u32) -> Float

fn neg_zero(p: u32) -> Float

fn max(p: u32) -> Float

fn min(p: u32) -> Float

fn min_positive(p: u32) -> Float

fn infinity(p: u32) -> Float

fn neg_infinity(p: u32) -> Float

fn nan(p: u32) -> Float

fn next_above(self) -> Float

fn next_below(self) -> Float

fn next_toward(self, target: &Float) -> Float

fn rand<R: Rng>(r: &mut R, p: u32) -> Float

Generate a float in [0, 1), with the same distribution as generating an integer in [0, 2**p) and dividing by 2**p. (i.e. pretty close to uniform, but the smallest bits aren't quite right).

fn abs(self) -> Float

fn sign(&self) -> Option<Sign>

fn negate(&mut self)

fn precision(&self) -> u32

fn with_precision(self, prec: u32) -> Float

fn mul_exp2(self, exp: i64) -> Float

Trait Implementations

impl Neg for Float

type Output = Float

fn neg(self) -> Float

impl<'a> Neg for &'a Float

type Output = Float

fn neg(self) -> Float

impl AddAssign<Float> for Float

fn add_assign(&mut self, other: Float)

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

fn add_assign(&mut self, other: &'a Float)

impl Add<Float> for Float

type Output = Float

fn add(self, other: Float) -> Float

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

type Output = Float

fn add(self, other: &'a Float) -> Float

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

type Output = Float

fn add(self, other: Float) -> Float

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

type Output = Float

fn add(self, other: &'a Float) -> Float

impl SubAssign<Float> for Float

fn sub_assign(&mut self, other: Float)

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

fn sub_assign(&mut self, other: &'a Float)

impl Sub<Float> for Float

type Output = Float

fn sub(self, other: Float) -> Float

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

type Output = Float

fn sub(self, other: &'a Float) -> Float

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

type Output = Float

fn sub(self, other: Float) -> Float

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

type Output = Float

fn sub(self, other: &'a Float) -> Float

impl PartialEq for Float

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

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

impl PartialOrd for Float

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

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

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

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

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

impl PartialEq<f32> for Float

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

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

impl PartialOrd<f32> for Float

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

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

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

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

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

impl PartialEq<f64> for Float

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

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

impl PartialOrd<f64> for Float

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

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

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

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

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

impl PartialEq<i8> for Float

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

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

impl PartialOrd<i8> for Float

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

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

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

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

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

impl PartialEq<i16> for Float

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

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

impl PartialOrd<i16> for Float

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

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

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

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

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

impl PartialEq<i32> for Float

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

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

impl PartialOrd<i32> for Float

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

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

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

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

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

impl PartialEq<i64> for Float

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

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

impl PartialOrd<i64> for Float

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

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

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

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

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

impl PartialEq<isize> for Float

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

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

impl PartialOrd<isize> for Float

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

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

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

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

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

impl PartialEq<u8> for Float

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

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

impl PartialOrd<u8> for Float

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

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

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

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

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

impl PartialEq<u16> for Float

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

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

impl PartialOrd<u16> for Float

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

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

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

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

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

impl PartialEq<u32> for Float

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

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

impl PartialOrd<u32> for Float

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

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

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

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

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

impl PartialEq<u64> for Float

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

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

impl PartialOrd<u64> for Float

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

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

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

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

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

impl PartialEq<usize> for Float

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

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

impl PartialOrd<usize> for Float

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

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

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

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

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

impl From<Int> for Float

fn from(x: Int) -> Float

impl From<i8> for Float

fn from(x: i8) -> Float

impl From<i16> for Float

fn from(x: i16) -> Float

impl From<i32> for Float

fn from(x: i32) -> Float

impl From<i64> for Float

fn from(x: i64) -> Float

impl From<isize> for Float

fn from(x: isize) -> Float

impl From<u8> for Float

fn from(x: u8) -> Float

impl From<u16> for Float

fn from(x: u16) -> Float

impl From<u32> for Float

fn from(x: u32) -> Float

impl From<u64> for Float

fn from(x: u64) -> Float

impl From<usize> for Float

fn from(x: usize) -> Float

impl From<f64> for Float

fn from(x: f64) -> Float

impl From<f32> for Float

fn from(x: f32) -> Float

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

fn mul_assign(&mut self, other: &'a Float)

impl MulAssign<Float> for Float

fn mul_assign(&mut self, other: Float)

impl Mul<Float> for Float

type Output = Float

fn mul(self, other: Float) -> Float

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

type Output = Float

fn mul(self, other: &'a Float) -> Float

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

type Output = Float

fn mul(self, other: Float) -> Float

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

type Output = Float

fn mul(self, other: &'a Float) -> Float

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

fn div_assign(&mut self, other: &'a Float)

impl DivAssign<Float> for Float

fn div_assign(&mut self, other: Float)

impl Div<Float> for Float

type Output = Float

fn div(self, other: Float) -> Float

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

type Output = Float

fn div(self, other: &'a Float) -> Float

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

type Output = Float

fn div(self, other: Float) -> Float

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

type Output = Float

fn div(self, other: &'a Float) -> Float

impl Clone for Float

fn clone(&self) -> Float

fn clone_from(&mut self, other: &Float)

impl Debug for Float

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