projects
/
libc-test
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9f72a5b
)
fix snprintf float testcase (uncovered by a recent printf bug fix)
author
Szabolcs Nagy
<nsz@port70.net>
Thu, 13 Mar 2014 19:36:49 +0000
(20:36 +0100)
committer
Szabolcs Nagy
<nsz@port70.net>
Thu, 13 Mar 2014 19:36:49 +0000
(20:36 +0100)
src/functional/snprintf.c
patch
|
blob
|
history
diff --git
a/src/functional/snprintf.c
b/src/functional/snprintf.c
index
2c94d02
..
600cd11
100644
(file)
--- a/
src/functional/snprintf.c
+++ b/
src/functional/snprintf.c
@@
-86,7
+86,8
@@
static const struct {
{ "%f", 1.3, "1.300000" },
{ "%f", 1.4, "1.400000" },
{ "%f", 1.5, "1.500000" },
- { "%.4f", 1.06125, "1.0612" },
+ { "%.4f", 1.06125, "1.0613" }, /* input is not representible exactly as double */
+ { "%.4f", 1.03125, "1.0312" }, /* 0x1.08p0 */
{ "%.2f", 1.375, "1.38" },
{ "%.1f", 1.375, "1.4" },
{ "%.1lf", 1.375, "1.4" },