We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
viper code: p = x % 0.0 is compile into [smod, [mul, [mload, 320 <x>], 10000000000], 0] without checking whether the divisor is zero.
p = x % 0.0
[smod, [mul, [mload, 320 <x>], 10000000000], 0]
in expr.py:
def arithmetic(self): ... elif isinstance(self.expr.op, ast.Mod): ... elif ltyp == 'num' and rtyp == 'decimal': o = LLLnode.from_list(['smod', ['mul', left, DECIMAL_DIVISOR], ['clamp_nonzero', right]], typ=BaseType('decimal', new_unit), pos=getpos(self.expr))
The text was updated successfully, but these errors were encountered:
Good catch, that is definitely a problem!
Sorry, something went wrong.
No branches or pull requests
What's your issue about?
viper code:
p = x % 0.0
is compile into[smod, [mul, [mload, 320 <x>], 10000000000], 0]
without checking whether the divisor is zero.
How can it be fixed?
in expr.py:
Cute Animal Picture
The text was updated successfully, but these errors were encountered: