aboutsummaryrefslogtreecommitdiffstats
path: root/test/mpfrieee.awk
diff options
context:
space:
mode:
authorjohn haque <j.eh@mchsi.com>2012-03-07 07:35:18 -0600
committerjohn haque <j.eh@mchsi.com>2012-03-07 07:35:18 -0600
commitb5431a4825e325c61f4043e4d25e47d7891c228c (patch)
tree506dd7e7636f292b24e6bc81a81678762b9bf3e6 /test/mpfrieee.awk
parent473623f186c3699c8886ccdd8a2afb7f4fe7a07e (diff)
downloadegawk-b5431a4825e325c61f4043e4d25e47d7891c228c.tar.gz
egawk-b5431a4825e325c61f4043e4d25e47d7891c228c.tar.bz2
egawk-b5431a4825e325c61f4043e4d25e47d7891c228c.zip
Bug fixes and tests for MPFR.
Diffstat (limited to 'test/mpfrieee.awk')
-rw-r--r--test/mpfrieee.awk13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/mpfrieee.awk b/test/mpfrieee.awk
new file mode 100644
index 00000000..dc6e120d
--- /dev/null
+++ b/test/mpfrieee.awk
@@ -0,0 +1,13 @@
+# Test IEEE-754 binary double format
+BEGIN {
+ x = 1.0e-320
+ i = 0
+ while (x > 0) {
+ printf("%.15e\n", x)
+ x /= 2
+
+ # terminate early when the test is going to fail.
+ if (++i > 50)
+ break
+ }
+}