Skip to main content

Crate oxinum_core

Crate oxinum_core 

Source
Expand description

Core traits, error types, and rounding modes for the OxiNum ecosystem.

This crate provides the foundational types shared by oxinum-int, oxinum-float, and oxinum-rational.

Structs§

ParseNumberError
Rich parse-error diagnostic carrying the offending message together with the 1-based line and column where the parser stopped.

Enums§

OxiNumError
Errors from OxiNum operations.
RoundingMode
Rounding modes for arbitrary-precision arithmetic.
Sign
Re-export the Sign type from dashu-base.

Traits§

Abs
Absolute value.
AbsOrd
Compare the magnitude of this number to the magnitude of the other number
BitTest
Bit query for integers
CubicRoot
Compute the cubic root of the number.
DivEuclid
Compute Euclidean quotient.
DivRem
Compute quotient and remainder at the same time.
DivRemAssign
Compute quotient inplace and return remainder at the same time.
DivRemEuclid
Compute Euclidean quotient and remainder at the same time.
EstimatedLog2
Fast estimation of the binary logarithm of a number
ExtendedGcd
Compute the greatest common divisor between self and the other operand, and return both the common divisor g and the Bézout coefficients respectively.
FromRadix
Parse a number from an arbitrary-radix string.
Gcd
Compute the greatest common divisor.
Inverse
Compute the multiplicative inverse (aka. reciprocal) of the number.
ModularArithmetic
Modular arithmetic operations.
OxiNum
Marker trait for all OxiNum numeric types.
OxiSigned
Trait for numeric types that carry a sign.
OxiUnsigned
Trait for unsigned numeric types.
Pow
Exponentiation trait.
PowerOfTwo
Functions related to the power of two.
Primality
Primality testing operations.
RemEuclid
Compute Euclidean remainder.
Roots
Root extraction trait.
Signed
This trait marks the number is signed.
SquareRoot
Compute the square root of the number.
ToRadix
Format a number as a string in an arbitrary radix.
UnsignedAbs
Unsigned absolute value.

Type Aliases§

OxiNumResult
Convenience alias for Result<T, OxiNumError>.