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:
@@ -59,6 +59,7 @@ ans = (-1.2) ** -3.4; print("%.5g %.5g" % (ans.real, ans.imag))
|
||||
|
||||
# check printing of inf/nan
|
||||
print(float('nan') * 1j)
|
||||
print(float('-nan') * 1j)
|
||||
print(float('inf') * (1 + 1j))
|
||||
print(float('-inf') * (1 + 1j))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user