Expand description
Traits for arithmetic.
Modulesยง
- abs
- Absolute value of
Floats. - add
- Addition of
Floats, and ofFloats withRationals. - div
- Division of
Floats, ofFloats byRationals, and ofRationals byFloats. - is_
power_ of_ 2 - An implementations of
IsPowerOf2, a trait for determining whether a number is an integer power of 2. - mul
- Multiplication of
Floats, and ofFloats withRationals. - neg
- Negation of
Floats. - power_
of_ 2 - Implementations of
PowerOf2, a trait for computing a power of 2. - reciprocal
- Implementations of
ReciprocalandReciprocalAssign, traits for computing the reciprocal of a number. - shl
- Left-shifting a
Float(multiplying it by a power of 2). - shl_
round - Implementations of
ShlRoundandShlRoundAssign, traits for multiplying a number by a power of 2 and rounding according to a specifiedRoundingMode. ForFloats, rounding is only necessary in the cases of overflow and underflow. - shr
- Right-shifting a
Float(dividing it by a power of 2). - shr_
round - Implementations of
ShlRoundandShrRoundAssign, traits for dividing a number by a power of 2 and rounding according to a specifiedRoundingMode. ForFloats, rounding is only necessary in the cases of overflow and underflow. - sign
- An implementation of
Sign, a trait for determining the sign of a number. - square
- Squaring of
Floats. - sub
- Subtraction of
Floats, ofFloats byRationals, and ofRationals byFloats.