Erik Arvidsson
7c4e2385ab
Normalize our number encoding ( #3370 )
...
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
2017-04-10 12:20:52 -07:00
..
2017-04-06 17:43:49 -07:00
2017-04-03 14:04:13 -07:00
2017-04-06 16:54:40 -07:00
2017-04-06 17:43:49 -07:00
2017-03-30 16:16:40 -07:00
2017-04-07 09:39:46 -07:00
2017-04-03 14:04:13 -07:00
2017-04-10 12:20:52 -07:00
2017-04-10 12:20:52 -07:00
2017-04-06 17:43:49 -07:00
2017-01-13 16:32:40 -08:00
2017-04-08 11:12:54 -07:00
2017-04-08 11:12:54 -07:00
2017-04-08 22:48:03 -07:00
2017-04-06 17:43:49 -07:00
2017-04-08 10:39:03 -07:00
2017-04-08 22:48:03 -07:00
2017-03-29 15:04:26 -07:00
2017-04-06 17:43:49 -07:00
2017-03-31 18:09:35 -07:00
2017-04-06 17:43:49 -07:00
2017-01-23 12:16:55 -08:00
2017-04-06 17:43:49 -07:00
2017-04-06 17:43:49 -07:00
2017-03-31 18:09:35 -07:00
2016-11-03 11:43:57 -07:00
2017-04-06 17:43:49 -07:00
2017-04-10 12:20:52 -07:00
2017-04-06 17:43:49 -07:00
2017-04-08 12:14:39 -07:00
2017-03-01 18:12:56 -08:00
2017-03-01 18:12:56 -08:00
2017-04-06 17:43:49 -07:00
2017-04-10 12:20:52 -07:00
2017-04-06 17:43:49 -07:00
2016-11-03 11:43:57 -07:00
2017-04-06 17:43:49 -07:00
2017-04-06 17:43:49 -07:00
2017-04-10 12:20:52 -07:00
2017-04-03 14:04:13 -07:00
2017-04-08 22:48:03 -07:00
2017-04-08 22:48:03 -07:00
2017-01-23 12:16:55 -08:00
2017-01-10 15:28:26 -08:00
2017-04-06 17:43:49 -07:00
2017-04-03 14:04:13 -07:00
2017-04-03 14:04:13 -07:00
2017-04-03 14:04:13 -07:00
2017-04-06 17:43:49 -07:00
2017-04-08 22:48:03 -07:00
2016-10-20 16:04:03 -07:00
2017-01-10 15:28:26 -08:00
2017-04-03 14:04:13 -07:00
2017-02-08 09:37:15 -08:00
2017-04-03 14:04:13 -07:00
2017-03-03 14:46:14 -08:00
2017-02-24 16:57:54 -08:00
2017-04-06 17:43:49 -07:00
2017-04-10 12:20:52 -07:00
2017-04-06 17:43:49 -07:00
2016-11-03 11:43:57 -07:00
2017-04-08 12:14:39 -07:00
2017-04-08 10:39:03 -07:00
2017-04-03 14:04:13 -07:00
2017-04-03 14:04:13 -07:00
2017-04-06 17:43:49 -07:00
2017-04-07 16:27:17 -07:00
2017-04-08 12:14:39 -07:00
2017-04-08 12:14:39 -07:00
2017-04-08 12:14:39 -07:00
2017-04-08 12:14:39 -07:00
2017-04-08 22:48:03 -07:00
2017-04-06 16:54:40 -07:00
2017-04-08 22:48:03 -07:00
2017-04-08 22:48:03 -07:00
2017-04-06 16:54:40 -07:00
2017-04-06 17:43:49 -07:00
2017-04-06 17:43:49 -07:00
2017-04-06 17:43:49 -07:00
2017-04-03 14:04:13 -07:00