mirror of
https://github.com/tweag/nickel.git
synced 2024-09-17 14:37:30 +03:00
aff367df7e
* Error on serializing very large numbers Instead of blindly using the nearest `f64` for all Nickel `Number`s when serializing, with this change we only use nearest rounding when a number is in the range `[f64::MIN, f64::MAX]`. Otherwise we trigger a newly introduced serialization error. This stops the previous, arguably surprising, result that for example `e400` gets serialized as `1.7976931348623157e308`. While techincally this is the nearest `f64` to `1e400`, one wouldn't expect serialization to incur an absolute error of about `1e92`. Fixes #1457 * Add tests |
||
---|---|---|
.. | ||
bin | ||
src | ||
tests/snapshot | ||
Cargo.toml |