Snoop: updates the default value for the fixed point transformation
This updates the default config for Snoop's fixed point transformation. Before, the source code has multiple versions of the configurations. Now it is:
{ "precision": 6, "max_relative_error": 0.1, "cast_mode": "Round", "inverse_scaling": 10, "resolution": 5 }
The values are to generate the same gas cost code as the protocol currently has as possible:
- precision=6 : the maximum bit components used to decompose coefficients (i.e. the number of
lsrs). The existing generated code uses precision=6. - max_relative_error=0.1 : threshold of the warning of the rounding near 0.0. The warning is not really important, since we have to round floats in any way.
- cast_mode=Round : we always use Round.
- inverse_scaling=10 : the inverse scaling of the grid size for larger intercepts. We need a big inverse_scaling to generate the same code currently we have as possible.
- resolution=5 : fthe rounding of the intercepts to grid points based on 5. We always use 5.
Edited by Jun Furuse