use dragonbox algorithm; alternative to #18008 (#18139)

* use dragonbox algorithm; alternative to #18008
* removed unsafe code
This commit is contained in:
Andreas Rumpf 2021-06-01 22:29:53 +02:00 • committed by GitHub
commit 63db2b19bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 1408 additions and 50 deletions

View file

@ -76,6 +76,10 @@
- `json` and `jsonutils` now serialize NaN, Inf, -Inf as strings, so that
`%[NaN, -Inf]` is the string `["nan","-inf"]` instead of `[nan,-inf]` which was invalid json.
- `system.addFloat` now uses the "Dragonbox" algorithm, which ensures correct roundtrips of floating point
numbers, that the minimum length representation of a floating point number is used and correct rounding.
Use `-d:nimLegacyAddFloat` for a transition period.
- `strformat` is now part of `include std/prelude`.
- Deprecated `proc reversed*[T](a: openArray[T], first: Natural, last: int): seq[T]` in `std/algorithm`.