overflow - pannous/wasp GitHub Wiki

overflow

In the primitive number type as well as in its lightweight wrapper class Number, numbers get automatically upgraded: if you multiply two int8 (bytes) you may get an int16, if you multiply two int60 you may get a bignum (which may or may not be different to javascripts bignum).

In rare situations where developers interact with primitive types directly overflow appears as following:

The 4 extra bits of int60 handle sign ±infinity nan/undefined and overflow. overflow is useful because an overflow number is still comparible: infinity < overflow < max-int.