Numeric
Index
Interfaces
Add
Type parameters
- Left
- Right = Left
- Output = Left
+
CheckedAdd
Type parameters
- Left
- Right = Left
- Output = Left
+?
Addition operator that returns
None
instead of wrapping around on overflow.
CheckedDivide
Type parameters
- Base
- Divider = Base
- Output = Base
/?
Division operator
CheckedMultiply
Type parameters
- Base
- Multiplier = Base
- Output = Base
*?
Multiplication operator that returns
None
instead of wrapping around on overflow.
CheckedPower
Type parameters
- Left
- Right = Left
- Output = Left
**?
Power operator that returns
None
instead of wrapping around on overflow.
CheckedRemainder
Type parameters
- Base
- Divider = Base
- Output = Base
%?
Remainder operator
CheckedSubtract
Type parameters
- Left
- Right = Left
- Output = Left
-?
Subtraction operator that returns
None
instead of wrapping around on overflow.
Divide
Type parameters
- Base
- Divider = Base
- Output = Base
/
Division operator
Multiply
Type parameters
- Left
- Right = Left
- Output = Left
*
Multiplication operator
Negate
Type parameters
- Self
- Output = Self
negate
Negates the given value.
Power
Type parameters
- Left
- Right = Left
- Output = Left
**
Power operator
Remainder
Type parameters
- Base
- Divider = Base
- Output = Base
%
Remainder operator
Signed
Type parameters
- T
abs
Absolute value. It should satisfy
Numeric['*'](Numeric.abs(x), Numeric.sign(x)) == x
isNegative
Returns true if the number is negative and false if the number is zero or positive.
isPositive
Returns true if the number is positive and false if the number is zero or negative.
sign
Sign of a number. It should satisfy
TSigned['*'](TSigned.abs(x), TSigned.sign(x)) == x
Subtract
Type parameters
- Left
- Right = Left
- Output = Left
-
Subtraction operator
Zero
Type parameters
- T
isZero
Returns true if self is equal to the additive identity.
zero
Returns the additive identity element of
T
, 0.
Addition operator