rust-lexical
rust-lexical copied to clipboard
Ruby float literal format improvements:
- Ruby floats are always formatted with an exponent sign.
- Ruby floats break to scientific at e-4.
- Ruby floats break to scientific at e14 (approximately).
- Ruby uses "Infinity" and "NaN", but "Infinity".to_f and "NaN".to_f are 0
The true behaviour for the positive exponent break is more subtle than this. In addition to this, values between 1.0e15 and 1.0e16 can take either decimal or exponent form depending on the number of significant digits. I did not find a sane way to replicate this behaviour here.
@Alexhuszagh any chance this can be merged and released? that way, we could get of the fork we're using ❤️
@Alexhuszagh any chance this can be merged and released? that way, we could get of the fork we're using ❤️
Hi @ianks, will review shortly. Thanks for understanding about the massive delay on this.
Thank you for your patience on this, merged. Will be planning a major release soon with this and some other enhancements.