It has been suggested that floating point numbers offer a larger dynamic range than integers, which is useful when dealing with cryptocurrencies that may have many zeros and arbitrary units.
Implement a floating point integer format in-circuit with matching Python implementation.
There is no need for addition, multiplication or division operations, it is only necessary to use it as a mechanism for compressing payment amounts.
The precision required by the exponent/mantissa format should be enough to make transfers of up to 1 million units of an ERC-20 token with 18 decimal places. This is different from 'floating point', it is more like a 'high dynamic range integer' where a smaller number of bits control the exponentiation of the integer while a smaller number represent its entropy.
10**18 * 1000000 = 1000000000000000000000000
The dynamic range for integers in Wei should be 0 to 1000000000000000000000000, with as much precision as possible to allow for payments which as closely match what the user desired.
It has been suggested that floating point numbers offer a larger dynamic range than integers, which is useful when dealing with cryptocurrencies that may have many zeros and arbitrary units.
Implement a floating point integer format in-circuit with matching Python implementation.
References:
Operations required:
There is no need for addition, multiplication or division operations, it is only necessary to use it as a mechanism for compressing payment amounts.
The precision required by the exponent/mantissa format should be enough to make transfers of up to 1 million units of an ERC-20 token with 18 decimal places. This is different from 'floating point', it is more like a 'high dynamic range integer' where a smaller number of bits control the exponentiation of the integer while a smaller number represent its entropy.
The dynamic range for integers in Wei should be
0
to1000000000000000000000000
, with as much precision as possible to allow for payments which as closely match what the user desired.