Expand description
Methods from the FloatCore trait, exposed as free functions.
Functionsยง
- abs
- Computes the absolute value of a number.
- ceil
- Returns the smallest integer greater than or equal to a number.
- classify
- Returns the floating point category of the number.
- epsilon
- Returns epsilon, a small positive value.
- floor
- Returns the largest integer less than or equal to a number.
- fract
- Returns the fractional part of a number.
- infinity
- Returns positive infinity.
- integer_
decode - Returns the mantissa, base 2 exponent, and sign as integers, respectively.
- is_
finite - Returns true if the number is neither infinite or
NaN. - is_
infinite - Returns true if the number is infinite.
- is_nan
- Returns true if the number is
NaN. - is_
normal - Returns true if the number is neither zero, infinite, subnormal or
NaN. - is_
sign_ negative - Returns true if the input is negative.
- is_
sign_ positive - Returns true if the input is positive.
- max
- Returns the maximum of the two numbers.
- max_
value - Returns the largest finite value that this type can represent.
- min
- Returns the minimum of the two numbers.
- min_
positive_ value - Returns the smallest positive, normalized value that this type can represent.
- min_
value - Returns the smallest finite value that this type can represent.
- nan
- Returns
NaN. - neg_
infinity - Returns negative infinity.
- neg_
zero - Returns
-0.0. - powi
- Raise a number to an integer power.
- recip
- Returns the reciprocal (multiplicative inverse) of the number.
- round
- Returns the nearest integer to a number. Round half-way cases away from
0.0. - signum
- Returns a number that represents the sign of.
- to_
degrees - Converts to degrees, assuming the number is in radians.
- to_
radians - Converts to radians, assuming the number is in degrees.
- trunc
- Returns the integer part of a number.