mirror of
https://github.com/dolthub/dolt.git
synced 2026-02-06 10:32:23 -06:00
Our Number encoding consists of two parts. Firsts we convert the float into f * 2**exp, then we uvarint encode f and exp. However, we didn't normalize f so in theory we could end up with multiple representations of the same number. This changes the representation to make the f the smallest possible integer that fulfills the formula above. For example we used to encode 256 as (0x100, 0) but with this we instead encode it as (0x01, 8). Fixes #2307