Crate f64ad_core

Source
Expand description

This is a member crate of the f64ad cargo workspace. For full description and documentation, refer to the f64ad_ crate.

Modules§

bounds
cast
f64ad
float
identities
int
ops
pow
real
sign

Macros§

abs_diff_eq
Approximate equality of using the absolute difference.
abs_diff_ne
Approximate inequality of using the absolute difference.
assert_abs_diff_eq
An assertion that delegates to abs_diff_eq!, and panics with a helpful error on failure.
assert_abs_diff_ne
An assertion that delegates to abs_diff_ne!, and panics with a helpful error on failure.
assert_relative_eq
An assertion that delegates to relative_eq!, and panics with a helpful error on failure.
assert_relative_ne
An assertion that delegates to relative_ne!, and panics with a helpful error on failure.
assert_ulps_eq
An assertion that delegates to ulps_eq!, and panics with a helpful error on failure.
assert_ulps_ne
An assertion that delegates to ulps_ne!, and panics with a helpful error on failure.
relative_eq
Approximate equality using both the absolute difference and relative based comparisons.
relative_ne
Approximate inequality using both the absolute difference and relative based comparisons.
ulps_eq
Approximate equality using both the absolute difference and ULPs (Units in Last Place).
ulps_ne
Approximate inequality using both the absolute difference and ULPs (Units in Last Place).

Structs§

AbsDiff
The requisite parameters for testing for approximate equality using a absolute difference based comparison.
ParseFloatError
Relative
The requisite parameters for testing for approximate equality using a relative based comparison.
Ulps
The requisite parameters for testing for approximate equality using an ULPs based comparison.

Enums§

FloatErrorKind

Traits§

AbsDiffEq
Equality that is defined using the absolute difference of two numbers.
AsPrimitive
A generic interface for casting between machine scalars with the as operator, which admits narrowing and precision loss. Implementers of this trait AsPrimitive should behave like a primitive numeric type (e.g. a newtype around another primitive), and the intended conversion must never fail.
Bounded
Numbers which have upper and lower bounds
CheckedAdd
Performs addition that returns None instead of wrapping around on overflow.
CheckedDiv
Performs division that returns None instead of panicking on division by zero and instead of wrapping around on underflow and overflow.
CheckedEuclid
CheckedMul
Performs multiplication that returns None instead of wrapping around on underflow or overflow.
CheckedNeg
Performs negation that returns None if the result can’t be represented.
CheckedRem
Performs an integral remainder that returns None instead of panicking on division by zero and instead of wrapping around on underflow and overflow.
CheckedShl
Performs a left shift that returns None on shifts larger than or equal to the type width.
CheckedShr
Performs a right shift that returns None on shifts larger than or equal to the type width.
CheckedSub
Performs subtraction that returns None instead of wrapping around on underflow.
ClosedAdd
Trait alias for Add and AddAssign with result of type Self.
ClosedDiv
Trait alias for Div and DivAssign with result of type Self.
ClosedMul
Trait alias for Mul and MulAssign with result of type Self.
ClosedNeg
Trait alias for Neg with result of type Self.
ClosedSub
Trait alias for Sub and SubAssign with result of type Self.
ComplexField
Trait shared by all complex fields and its subfields (like real numbers).
ConstOne
Defines an associated constant representing the multiplicative identity element for Self.
ConstZero
Defines an associated constant representing the additive identity element for Self.
Euclid
Field
Trait implemented by fields, i.e., complex numbers and floats.
Float
Generic trait for floating point numbers
FloatConst
FromBytes
FromPrimitive
A generic trait for converting a number to a value.
Inv
Unary operator for retrieving the multiplicative inverse, or reciprocal, of a value.
MulAdd
Fused multiply-add. Computes (self * a) + b with only one rounding error, yielding a more accurate result than an unfused multiply-add.
MulAddAssign
The fused multiply-add assignment operation *self = (*self * a) + b
Num
The base trait for numeric types, covering 0 and 1 values, comparisons, basic numeric operations, and string conversion.
NumAssign
The trait for Num types which also implement assignment operators.
NumAssignOps
Generic trait for types implementing numeric assignment operators (like +=).
NumAssignRef
The trait for NumAssign types which also implement assignment operations taking the second operand by reference.
NumCast
An interface for casting between machine scalars.
NumOps
Generic trait for types implementing basic numeric operations
NumRef
The trait for Num types which also implement numeric operations taking the second operand by reference.
One
Defines a multiplicative identity element for Self.
Pow
Binary operator for raising a value to a power.
PrimInt
Generic trait for primitive integers.
RealField
Trait shared by all reals.
RefNum
The trait for Num references which implement numeric operations, taking the second operand either by value or by reference.
RelativeEq
Equality comparisons between two numbers using both the absolute difference and relative based comparisons.
Saturating
Saturating math operations. Deprecated, use SaturatingAdd, SaturatingSub and SaturatingMul instead.
SaturatingAdd
Performs addition that saturates at the numeric bounds instead of overflowing.
SaturatingMul
Performs multiplication that saturates at the numeric bounds instead of overflowing.
SaturatingSub
Performs subtraction that saturates at the numeric bounds instead of overflowing.
Signed
Useful functions for signed numbers (i.e. numbers that can be negative).
SubsetOf
Nested sets and conversions between them (using an injective mapping). Useful to work with substructures. In generic code, it is preferable to use SupersetOf as trait bound whenever possible instead of SubsetOf (because SupersetOf is automatically implemented whenever SubsetOf is).
SupersetOf
Nested sets and conversions between them. Useful to work with substructures. It is preferable to implement the SubsetOf trait instead of SupersetOf whenever possible (because SupersetOf is automatically implemented whenever SubsetOf is).
ToBytes
ToPrimitive
A generic trait for converting a value to a number.
UlpsEq
Equality comparisons between two numbers using both the absolute difference and ULPs (Units in Last Place) based comparisons.
Unsigned
A trait for values which cannot be negative
WrappingAdd
Performs addition that wraps around on overflow.
WrappingMul
Performs multiplication that wraps around on overflow.
WrappingNeg
Performs a negation that does not panic.
WrappingShl
Performs a left shift that does not panic.
WrappingShr
Performs a right shift that does not panic.
WrappingSub
Performs subtraction that wraps around on overflow.
Zero
Defines an additive identity element for Self.

Functions§

abs
Computes the absolute value.
abs_sub
The positive difference of two numbers.
cast
Cast from one machine scalar to another.
checked_pow
Raises a value to the power of exp, returning None if an overflow occurred.
clamp
A value bounded by a minimum and a maximum
clamp_max
A value bounded by a maximum value
clamp_min
A value bounded by a minimum value
one
Returns the multiplicative identity, 1.
pow
Raises a value to the power of exp, using exponentiation by squaring.
signum
Returns the sign of the number.
zero
Returns the additive identity, 0.