[kaffe] CVS kaffe (guilhem): Added testcase for strict IEEE computation

Kaffe CVS cvs-commits at kaffe.org
Wed Jun 15 06:32:43 PDT 2005


PatchSet 6645 
Date: 2005/06/15 12:39:53
Author: guilhem
Branch: HEAD
Tag: (none) 
Log:
Added testcase for strict IEEE computation

Members: 
	ChangeLog:1.4171->1.4172 
	test/regression/DoubleIEEE.java:INITIAL->1.1 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4171 kaffe/ChangeLog:1.4172
--- kaffe/ChangeLog:1.4171	Wed Jun 15 09:56:19 2005
+++ kaffe/ChangeLog	Wed Jun 15 12:39:53 2005
@@ -1,5 +1,10 @@
 2005-06-15  Guilhem Lavaux  <guilhem at kaffe.org>
 
+	* test/regression/DoubleIEEE.java: New testcase for strict IEEE
+	computation.
+
+2005-06-15  Guilhem Lavaux  <guilhem at kaffe.org>
+
 	* config/i386/linux/md.c
 	(init_md): Setup the FP unit to use double precision and not extended
 	precision.
===================================================================
Checking out kaffe/test/regression/DoubleIEEE.java
RCS:  /home/cvs/kaffe/kaffe/test/regression/DoubleIEEE.java,v
VERS: 1.1
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/test/regression/DoubleIEEE.java	Wed Jun 15 13:32:43 2005
@@ -0,0 +1,23 @@
+/* This testcase is taken from
+ * http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=255502
+ */
+import java.lang.*;
+
+public class DoubleIEEE {
+    volatile double x, y, z;
+
+    public void doTest()
+    {
+        x = 9007199254740994.0; /* 2^53 + 2 */
+        y = 1.0 - 1/65536.0;
+        z = x + y;
+        System.out.println("z = " + z);
+    }
+	
+    public static void main(String[] args) throws Exception {
+	(new DoubleIEEE()).doTest();
+    }
+}
+/* Expected output:
+z = 9.007199254740994E15
+*/



More information about the kaffe mailing list