Module math

Source
Expand description

RE math library.

Modules§

bnum_integer
Definitions of safe integers and uints.
decimal
precise_decimal
rounding_mode
traits

Structs§

Decimal
Decimal represents a 192 bit representation of a fixed-scale decimal number.
I192
Provides safe integer arithmetic.
I256
Provides safe integer arithmetic.
I320
Provides safe integer arithmetic.
I384
Provides safe integer arithmetic.
I448
Provides safe integer arithmetic.
I512
Provides safe integer arithmetic.
I768
Provides safe integer arithmetic.
PreciseDecimal
PreciseDecimal represents a 256 bit representation of a fixed-scale decimal number.
U192
Provides safe integer arithmetic.
U256
Provides safe integer arithmetic.
U320
Provides safe integer arithmetic.
U384
Provides safe integer arithmetic.
U448
Provides safe integer arithmetic.
U512
Provides safe integer arithmetic.
U768
Provides safe integer arithmetic.

Enums§

ParseDecimalError
Represents an error when parsing Decimal from another type.
ParseI192Error
ParseI256Error
ParseI320Error
ParseI384Error
ParseI448Error
ParseI512Error
ParseI768Error
ParsePreciseDecimalError
Represents an error when parsing PreciseDecimal from another type.
ParseU192Error
ParseU256Error
ParseU320Error
ParseU384Error
ParseU448Error
ParseU512Error
ParseU768Error
RoundingMode
Defines the rounding strategy.

Traits§

Cbrt
CheckedAdd
CheckedDiv
CheckedMul
CheckedNeg
CheckedSub
CheckedTruncate
NthRoot
SaturatingAdd
Sqrt

Type Aliases§

InnerDecimal
InnerPreciseDecimal