ruma / js_int

JavaScript-interoperable integer types for Rust
MIT License
16 stars 8 forks source link

Allow negative zero for Int? #6

Open jplatte opened 5 years ago

jplatte commented 5 years ago

f64 has separate binary representations for 0 and -0. They compare equal, but the minus sign is often visible when printed the value. However, in JS converting -0 to a string results in "0". If we do add a separate binary representation, we need to ensure it compares equal and produces the same hash as 0 though.