Module std::numStable [-]  [+] [src]

Numeric traits and functions for generic mathematics

These are implemented for the primitive numeric types in std::{u8, u16, u32, u64, uint, i8, i16, i32, i64, int, f32, f64}.

Modules

strconv

Enums

FpCategory

Used for representing the classification of floating point numbers

Traits

Bounded
Float

A built-in floating point number.

FloatMath

Mathematical operations on primitive floating point numbers.

FromPrimitive

A generic trait for converting a number to a value.

FromStrRadix

A generic trait for converting a string with a radix (base) to a value

Int

A built-in signed or unsigned integer.

Num
NumCast

An interface for casting between machine scalars.

One
Primitive
SignedInt

A built-in two's complement integer.

ToPrimitive

A generic trait for converting a value to a number.

Unsigned
UnsignedInt

A built-in unsigned integer.

Zero

Functions

abs_sub
cast

Cast from one machine scalar to another.

checked_next_power_of_two
div_rem

Simultaneous division and remainder

from_f32

A utility function that just calls FromPrimitive::from_f32.

from_f64

A utility function that just calls FromPrimitive::from_f64.

from_i16

A utility function that just calls FromPrimitive::from_i16.

from_i32

A utility function that just calls FromPrimitive::from_i32.

from_i64

A utility function that just calls FromPrimitive::from_i64.

from_i8

A utility function that just calls FromPrimitive::from_i8.

from_int

A utility function that just calls FromPrimitive::from_int.

from_str_radix

A utility function that just calls FromStrRadix::from_str_radix.

from_u16

A utility function that just calls FromPrimitive::from_u16.

from_u32

A utility function that just calls FromPrimitive::from_u32.

from_u64

A utility function that just calls FromPrimitive::from_u64.

from_u8

A utility function that just calls FromPrimitive::from_u8.

from_uint

A utility function that just calls FromPrimitive::from_uint.

is_power_of_two
next_power_of_two
one
pow

Raises a base to the power of exp, using exponentiation by squaring.

zero