pub trait FloatingPoint: Numeric + Neg<Output = Self> + Add<Self, Output = Self> + AddAssign<Self> + Div<Self, Output = Self> + DivAssign<Self> + Mul<Self, Output = Self> + MulAssign<Self> + Rem<Self, Output = Self> + RemAssign<Self> + Sub<Self, Output = Self> + SubAssign<Self> {
    fn powi(self, power: i32) -> Self;
    fn round(self) -> Self;
    fn fract(self) -> Self;
    fn rem_euclid(self, rhs: Self) -> Self;
    fn sqrt(self) -> Self;
    fn ln(self) -> Self;
    fn abs(self) -> Self;
    fn floor(self) -> Self;
    fn to_bit_string(&self) -> String;
}
Expand description

A trait shared by all the floating point types.

Required Methods

Raises a float to an integer power.

Rounds the float to the closest integer.

Keeps the fractional part of the number.

Remainder of the euclidean division.

Returns the square root of the input float.

Returns the natural logarithm of the input float.

Returns the absolute value of the input float.

Returns the floor value of the input float.

Returns a bit representation of the float, with the sign, exponent, and mantissa bits separated by whitespaces for increased readability.

Implementations on Foreign Types

Implementors