Crate num_rational

Source
Expand description

Rational numbers

ยงCompatibility

The num-rational crate is tested for rustc 1.60 and greater.

Modulesยง

iter_sum_product ๐Ÿ”’
opassign ๐Ÿ”’
pow ๐Ÿ”’

Macrosยง

arith_impl ๐Ÿ”’
checked_arith_impl ๐Ÿ”’
forward_all_binop ๐Ÿ”’
forward_ref_ref_binop ๐Ÿ”’
forward_ref_val_binop ๐Ÿ”’
forward_val_ref_binop ๐Ÿ”’
from_primitive_integer ๐Ÿ”’
impl_formatting ๐Ÿ”’

Structsยง

ParseRatioError
Ratio
Represents the ratio between two numbers.

Enumsยง

RatioErrorKind ๐Ÿ”’

Traitsยง

Bits ๐Ÿ”’

Functionsยง

approximate_float ๐Ÿ”’
approximate_float_unsigned ๐Ÿ”’
ldexp ๐Ÿ”’
Multiply x by 2 to the power of exp. Returns an accurate result even if 2^exp is not representable.
ratio_to_f64 ๐Ÿ”’
Converts a ratio of T to an f64.

Type Aliasesยง

BigRational
Alias for arbitrary precision rationals.
RationalDeprecated
Alias for a Ratio of machine-sized integers.
Rational32
Alias for a Ratio of 32-bit-sized integers.
Rational64
Alias for a Ratio of 64-bit-sized integers.