예제 #1
0
 def __truediv__(self, other: 'ExactRealProgram'):
     other = cast_input(other)
     return ExactDiv([self, other])
예제 #2
0
 def __sub__(self, other: 'ExactRealProgram'):
     other = cast_input(other)
     return ExactSub([self, other])
예제 #3
0
 def __mul__(self, other: 'ExactRealProgram'):
     other = cast_input(other)
     return ExactMul([self, other])
예제 #4
0
 def __add__(self, other: 'ExactRealProgram'):
     other = cast_input(other)
     return ExactAdd([self, other])
예제 #5
0
 def __rtruediv__(self, other: 'ExactRealProgram'):
     return cast_input(other) / self
예제 #6
0
 def __rmul__(self, other: 'ExactRealProgram'):
     return cast_input(other) * self
예제 #7
0
 def __rsub__(self, other: 'ExactRealProgram'):
     return cast_input(other) - self
예제 #8
0
 def __radd__(self, other: 'ExactRealProgram'):
     return cast_input(other) + self