dtoa fix for minus zero

This commit is contained in:
Fabrice Bellard
2025-04-21 15:33:47 +02:00
parent 37cde16ba2
commit dbbca3dbf3
2 changed files with 6 additions and 11 deletions

View File

@@ -393,6 +393,7 @@ function test_number()
assert((-1.125).toFixed(2), "-1.13");
assert((0.5).toFixed(0), "1");
assert((-0.5).toFixed(0), "-1");
assert((-1e-10).toFixed(0), "-0");
assert((1.3).toString(7), "1.2046204620462046205");
assert((1.3).toString(35), "1.ahhhhhhhhhm");