Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@annotate(delay_type.bool, other=delay_type_float)
def __gt__(self, other):
return bool(self.val > other.val)
@annotate(delay_type.double)
def __exp__(self):
return math.exp(self.val)
@annotate(delay_type.bool, other=delay_type_float)
def __ne__(self, other):
return bool(self.val != other.val)
@annotate(delay_type.double)
def __double__(self):
return float(self.val)
@annotate(delay_type_int, other=delay_type_int)
def __add__(self, other):
assert (isinstance(other, int))
return int(self.val + other.val)
@annotate(delay_type_float, other=delay_type_float)
def __mod__(self, other):
assert (isinstance(other, double))
return double(self.val % other.val)
@annotate(delay_type.bool, other=delay_type.bool)
def __eq__(self, other):
return bool(self.val == other.val)
@annotate(delay_type_int, other=delay_type_int)
def __mod__(self, other):
assert (isinstance(other, int))
return int(self.val % other.val)
@annotate(delay_type_float)
def __double__(self):
return float(self.val)
@annotate(delay_type_float, other=delay_type_float)
def __mul__(self, other):
assert (isinstance(other, double))
return double(self.val * other.val)