verry.interval.Operator#
- class verry.interval.Operator#
Bases:
ABC
,Generic
Provides arithmetic with directed rounding and basic constants.
Notes
Classes that inherit from this must define the class constants ZERO, ONE, and INFINITY.
- abstractmethod cadd(lhs, rhs)#
Add and round towards positive infinity.
- abstractmethod cdiv(lhs, rhs)#
Divide and round towards positive infinity.
- abstractmethod cmul(lhs, rhs)#
Multiply and round towards positive infinity.
- abstractmethod csqr(value)#
Calcurate the square root and round towards positive infinity.
- csub(lhs, rhs)#
Subtract and round towards positive infinity.
This method is defined as
cadd(lhs, -rhs)
if not overloaded.
- fadd(lhs, rhs)#
Add and round towards negative infinity.
This method is defined as
-cadd(-lhs, -rhs)
if not overloaded.
- fdiv(lhs, rhs)#
Divide and round towards negative infinity.
This method is defined as
-cdiv(-lhs, rhs)
if not overloaded.
- fmul(lhs, rhs)#
Multiply and round towards negative infinity.
This method is defined as
-cmul(-lhs, rhs)
if not overloaded.
- abstractmethod fsqr(value)#
Calcurate the square root and round towards negative infinity.
- fsub(lhs, rhs)#
Subtract and round towards negative infinity.
This method is defined as
-cadd(-lhs, rhs)
if not overloaded.