Commit b64e0575 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

tests/float/string_format: Add testcase for incorrect rounding for %f.

parent 9aaccd47
...@@ -32,6 +32,12 @@ test("{:06e}", float("nan")) ...@@ -32,6 +32,12 @@ test("{:06e}", float("nan"))
# The following fails right now # The following fails right now
#test("{:10.1}", 0.0) #test("{:10.1}", 0.0)
print("%.0f" % (1.750000 % 0.08333333333))
# Below isn't compatible with single-precision float
#print("%.1f" % (1.750000 % 0.08333333333))
#print("%.2f" % (1.750000 % 0.08333333333))
#print("%.12f" % (1.750000 % 0.08333333333))
def test_fmt(conv, fill, alignment, sign, prefix, width, precision, type, arg): def test_fmt(conv, fill, alignment, sign, prefix, width, precision, type, arg):
fmt = '{' fmt = '{'
if conv: if conv:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment