mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 12:10:13 +01:00
py: Remove unnecessary extra handling of padding of nan/inf.
C's printf will pad nan/inf differently to CPython. Our implementation originally conformed to C, now it conforms to CPython's way. Tests for this are also added in this patch.
This commit is contained in:
@@ -17,3 +17,7 @@ print("%f" % 1.23456)
|
||||
print("%F" % 1.23456)
|
||||
print("%g" % 1.23456)
|
||||
print("%G" % 1.23456)
|
||||
|
||||
print("%06e" % float("inf"))
|
||||
print("%06e" % float("-inf"))
|
||||
print("%06e" % float("nan"))
|
||||
|
||||
Reference in New Issue
Block a user