summaryrefslogtreecommitdiff
path: root/libm/double/fltest2.c
diff options
context:
space:
mode:
Diffstat (limited to 'libm/double/fltest2.c')
-rw-r--r--libm/double/fltest2.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/libm/double/fltest2.c b/libm/double/fltest2.c
new file mode 100644
index 000000000..405b81b6a
--- /dev/null
+++ b/libm/double/fltest2.c
@@ -0,0 +1,18 @@
+int drand();
+double exp(), frexp(), ldexp();
+volatile double x, y, z;
+
+main()
+{
+int i, e;
+
+for( i=0; i<100000; i++ )
+ {
+ drand(&x);
+ x = exp( 10.0*(x - 1.5) );
+ y = frexp( x, &e );
+ z = ldexp( y, e );
+ if( z != x )
+ abort();
+ }
+}