Module num

1.0.0 · Source
Expand description

Numeric traits and functions for the built-in numeric types.

Modules§

bignum 👻 Experimental
Custom arbitrary-precision number (bignum) implementation.
dec2flt 👻 Experimental
Converting decimal strings into IEEE 754 binary floating point numbers.
diy_float 👻 Experimental
Extended precision “soft float”, for internal use only.
flt2dec 👻 Experimental
Floating-point number to decimal conversion routines.
fmt 👻 Experimental
Shared utilities used by both float and integer formatting.
niche_types 👻 Experimental
100% perma-unstable

Structs§

NonZero
A value that is known not to equal zero.
ParseFloatError
An error which can be returned when parsing a float.
ParseIntError
An error which can be returned when parsing an integer.
Saturating
Provides intentionally-saturating arithmetic on T.
TryFromIntError
The error type returned when a checked integral type conversion fails.
Wrapping
Provides intentionally-wrapped arithmetic on T.

Enums§

FpCategory
A classification of floating point numbers.
IntErrorKind
Enum to store the various types of errors that can cause parsing an integer to fail.

Traits§

ZeroablePrimitiveExperimental
A marker trait for primitive types which can be zero.

Functions§

can_not_overflow 👻 Experimental
Determines if a string of text of that length of that radix could be guaranteed to be stored in the given type T. Note that if the radix is known to the compiler, it is just the check of digits.len that is done at runtime.

Type Aliases§

NonZeroI8
An i8 that is known not to equal zero.
NonZeroI16
An i16 that is known not to equal zero.
NonZeroI32
An i32 that is known not to equal zero.
NonZeroI64
An i64 that is known not to equal zero.
NonZeroI128
An i128 that is known not to equal zero.
NonZeroIsize
An isize that is known not to equal zero.
NonZeroU8
A u8 that is known not to equal zero.
NonZeroU16
A u16 that is known not to equal zero.
NonZeroU32
A u32 that is known not to equal zero.
NonZeroU64
A u64 that is known not to equal zero.
NonZeroU128
A u128 that is known not to equal zero.
NonZeroUsize
A usize that is known not to equal zero.