1
0
Fork 0
mirror of synced 2025-09-23 12:18:44 +00:00
ZoKrates/zokrates_cli/examples/test_lt_max_value.code
2018-08-20 16:43:53 +02:00

8 lines
No EOL
370 B
Text

// we can compare numbers up to 2^(pbits - 2) - 1, ie any number which fits in (pbits - 2) bits
// lt should work for the maxvalue = 2^(pbits - 2) - 1
def main(field a) -> (field):
field pbits = 254
// maxvalue = 2**252 - 1
field maxvalue = 7237005577332262213973186563042994240829374041602535252466099000494570602496 - 1
return if 0 < maxvalue then 1 else 0 fi