rust-lexical icon indicating copy to clipboard operation
rust-lexical copied to clipboard

Ruby float literal format improvements:

Open burke opened this issue 1 year ago • 1 comments

  • 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.

burke avatar Mar 12 '24 15:03 burke

@Alexhuszagh any chance this can be merged and released? that way, we could get of the fork we're using ❤️

ianks avatar Aug 09 '24 21:08 ianks

@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.

Alexhuszagh avatar Sep 08 '24 21:09 Alexhuszagh

Thank you for your patience on this, merged. Will be planning a major release soon with this and some other enhancements.

Alexhuszagh avatar Sep 09 '24 02:09 Alexhuszagh