[][src]Module prefix_num_ops::float_core

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.