summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authordas <das@FreeBSD.org>2007-01-03 21:28:26 +0000
committerdas <das@FreeBSD.org>2007-01-03 21:28:26 +0000
commit269e2dc4928188503ec9fd04ee00cb8405ba6446 (patch)
treeef63a9f9fe10f450ecb9251a894e0dd5f08e9c01 /tools
parente2797fe01cc1151c85329056a387e4343995497a (diff)
downloadFreeBSD-src-269e2dc4928188503ec9fd04ee00cb8405ba6446.zip
FreeBSD-src-269e2dc4928188503ec9fd04ee00cb8405ba6446.tar.gz
Remove the test that ensures that when the string "nan(...)" is converted
to floating-point, the result is a quiet NaN. The current implementation may return a signaling NaN, and the vendor has no plans for changing this, for reasons explained in the comment I added.
Diffstat (limited to 'tools')
-rw-r--r--tools/regression/lib/libc/stdio/test-scanfloat.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/regression/lib/libc/stdio/test-scanfloat.c b/tools/regression/lib/libc/stdio/test-scanfloat.c
index 342fc73..ef6faae 100644
--- a/tools/regression/lib/libc/stdio/test-scanfloat.c
+++ b/tools/regression/lib/libc/stdio/test-scanfloat.c
@@ -190,7 +190,15 @@ main(int argc, char *argv[])
assert(f != f);
assert(d != d);
assert(ld != ld);
+#if 0
+ /*
+ * POSIX says we should only generate quiet NaNs, but the gdtoa
+ * author convincingly argues that if you ask for a NaN format
+ * based on some implementation-defined string, you should get
+ * what you asked for, even if it's a signaling NaN.
+ */
assert(fetestexcept(FE_INVALID) == 0);
+#endif
printf("ok 2 - scanfloat\n");
OpenPOWER on IntegriCloud