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

[BUG] -0.0 printed as "0.0"

Open mwkmwkmwk opened this issue 1 year ago • 1 comments

Description

The write_float functionality does not print the sign of negative 0.

Prerequisites

  • Rust version: rustc 1.70.0-nightly (478cbb42b 2023-03-28)
  • lexical version: 6.1.1
  • lexical compilation features used: [defaults]

Test case

Example test case:

fn main() {
    let f: f64 = -0.0;
    let s = lexical::to_string(f);
    assert_eq!(s, "-0.0");
}

mwkmwkmwk avatar Apr 04 '23 18:04 mwkmwkmwk

Any progress toward fixing this bug?

ArchLeaders avatar Dec 25 '23 09:12 ArchLeaders