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
if _int < 0: self.put_bool(1) s = 2 ** (bitsize - 1) self.put_arbitrary_uint(s - _int, bitsize - 1) else: self.put_bool(0) self.put_arbitrary_uint(_int, bitsize - 1)
The s - _int must be s + _int (since _int is negative)
s - _int
s + _int
otherwise you get a Exception: Not enough bits (1) to encode integer (3) error
Exception: Not enough bits (1) to encode integer (3)
Try:
from tvm_valuetypes.cell import Cell c = Cell() c.data.put_arbitrary_int(-1, 2)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The
s - _int
must bes + _int
(since _int is negative)otherwise you get a
Exception: Not enough bits (1) to encode integer (3)
errorTry:
The text was updated successfully, but these errors were encountered: