py/formatfloat: Don't print the negative sign of a NaN value.

NaN may have the sign bit set but it has no meaning, so don't print it out.
This commit is contained in:
Damien George
2017-10-04 23:15:55 +11:00
parent 81a06d2c9c
commit 08a196697c
3 changed files with 4 additions and 2 deletions

View File

@@ -21,6 +21,7 @@ print(float("INF"))
print(float("infinity"))
print(float("INFINITY"))
print(float("nan"))
print(float("-nan"))
print(float("NaN"))
try:
float("")