[kaffe] CVS kaffe (robilad): Switched java.lang.Math over to gnu classpath

Kaffe CVS cvs-commits at kaffe.org
Thu May 19 05:32:50 PDT 2005


PatchSet 6557 
Date: 2005/05/19 12:27:44
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Switched java.lang.Math over to gnu classpath

2005-05-19  Dalibor Topic  <robilad at kaffe.org>

        * libraries/clib/native/Math.c: Removed.

        * libraries/clib/native/java_lang_Math.c: Added.

        * libraries/javalib/java/lang/Math.java: Replaced by implementation
        from GNU Classpath.

        * libraries/clib/native/Makefile.am (LANG_SOURCES) Updated.

Members: 
	ChangeLog:1.4083->1.4084 
	libraries/clib/native/Makefile.am:1.45->1.46 
	libraries/clib/native/Makefile.in:1.184->1.185 
	libraries/clib/native/Math.c:1.7->1.8(DEAD) 
	libraries/clib/native/java_lang_Math.c:INITIAL->1.1 
	libraries/javalib/java/lang/Math.java:INITIAL->1.12 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4083 kaffe/ChangeLog:1.4084
--- kaffe/ChangeLog:1.4083	Thu May 19 10:18:01 2005
+++ kaffe/ChangeLog	Thu May 19 12:27:44 2005
@@ -1,5 +1,16 @@
 2005-05-19  Dalibor Topic  <robilad at kaffe.org>
 
+	* libraries/clib/native/Math.c: Removed.
+
+	* libraries/clib/native/java_lang_Math.c: Added.
+
+	* libraries/javalib/java/lang/Math.java: Replaced by implementation
+	from GNU Classpath.
+
+	* libraries/clib/native/Makefile.am (LANG_SOURCES) Updated.
+
+2005-05-19  Dalibor Topic  <robilad at kaffe.org>
+
         Resynced with GNU Classpath.
 
 	2005-05-18  Thomas Fitzsimmons  <fitzsim at redhat.com>
Index: kaffe/libraries/clib/native/Makefile.am
diff -u kaffe/libraries/clib/native/Makefile.am:1.45 kaffe/libraries/clib/native/Makefile.am:1.46
--- kaffe/libraries/clib/native/Makefile.am:1.45	Tue May 17 10:20:13 2005
+++ kaffe/libraries/clib/native/Makefile.am	Thu May 19 12:27:47 2005
@@ -3,7 +3,7 @@
 # Copyright (c) 1996, 1997, 1998, 1999
 #	Transvirtual Technologies, Inc.  All rights reserved.
 #
-# Copyright (c) 2004
+# Copyright (c) 2004, 2005
 #	Kaffe.org contributors. All rights reserved.
 #
 # See the file "license.terms" for information on usage and redistribution 
@@ -18,24 +18,24 @@
         -I$(top_srcdir)/libraries/clib/fdlibm
 
 LANG_SRCS = \
+		gnu_classpath_VMStackWalker.c \
+		gnu_classpath_VMSystemProperties.c \
+		java_lang_VMFloat.c \
+		java_lang_Math.c \
+		java_lang_VMDouble.c \
+		java_lang_VMSystem.c \
 		Class.c \
 		ClassLoader.c \
-		java_lang_VMDouble.c \
-		java_lang_VMFloat.c \
-		Math.c \
 		MemoryAdvice.c \
 		Object.c \
 		PrimordialClassLoader.c \
 		Runtime.c \
 		String.c \
 		System.c \
-		java_lang_VMSystem.c \
 		Thread.c \
 		ThreadStack.c \
 		Throwable.c \
 		UNIXProcess.c \
-		gnu_classpath_VMStackWalker.c \
-		gnu_classpath_VMSystemProperties.c \
 		ZipFile.c
 
 REF_SRCS= \
Index: kaffe/libraries/clib/native/Makefile.in
diff -u kaffe/libraries/clib/native/Makefile.in:1.184 kaffe/libraries/clib/native/Makefile.in:1.185
--- kaffe/libraries/clib/native/Makefile.in:1.184	Tue May 17 10:20:13 2005
+++ kaffe/libraries/clib/native/Makefile.in	Thu May 19 12:27:47 2005
@@ -19,7 +19,7 @@
 # Copyright (c) 1996, 1997, 1998, 1999
 #	Transvirtual Technologies, Inc.  All rights reserved.
 #
-# Copyright (c) 2004
+# Copyright (c) 2004, 2005
 #	Kaffe.org contributors. All rights reserved.
 #
 # See the file "license.terms" for information on usage and redistribution 
@@ -91,18 +91,18 @@
 am__DEPENDENCIES_2 = ../../../kaffe/kaffevm/libkaffevm.la \
 	$(top_builddir)/libraries/clib/fdlibm/libfdlibm.la \
 	$(top_builddir)/libraries/clib/classpath/libclasspath.la
-am__objects_1 = libnative_la-Class.lo libnative_la-ClassLoader.lo \
+am__objects_1 = libnative_la-gnu_classpath_VMStackWalker.lo \
+	libnative_la-gnu_classpath_VMSystemProperties.lo \
+	libnative_la-java_lang_VMFloat.lo \
+	libnative_la-java_lang_Math.lo \
 	libnative_la-java_lang_VMDouble.lo \
-	libnative_la-java_lang_VMFloat.lo libnative_la-Math.lo \
-	libnative_la-MemoryAdvice.lo libnative_la-Object.lo \
-	libnative_la-PrimordialClassLoader.lo libnative_la-Runtime.lo \
-	libnative_la-String.lo libnative_la-System.lo \
-	libnative_la-java_lang_VMSystem.lo libnative_la-Thread.lo \
+	libnative_la-java_lang_VMSystem.lo libnative_la-Class.lo \
+	libnative_la-ClassLoader.lo libnative_la-MemoryAdvice.lo \
+	libnative_la-Object.lo libnative_la-PrimordialClassLoader.lo \
+	libnative_la-Runtime.lo libnative_la-String.lo \
+	libnative_la-System.lo libnative_la-Thread.lo \
 	libnative_la-ThreadStack.lo libnative_la-Throwable.lo \
-	libnative_la-UNIXProcess.lo \
-	libnative_la-gnu_classpath_VMStackWalker.lo \
-	libnative_la-gnu_classpath_VMSystemProperties.lo \
-	libnative_la-ZipFile.lo
+	libnative_la-UNIXProcess.lo libnative_la-ZipFile.lo
 am__objects_2 = libnative_la-Array.lo libnative_la-Constructor.lo \
 	libnative_la-Field.lo libnative_la-Method.lo
 am__objects_3 = libnative_la-AccessController.lo
@@ -412,24 +412,24 @@
         -I$(top_srcdir)/libraries/clib/fdlibm
 
 LANG_SRCS = \
+		gnu_classpath_VMStackWalker.c \
+		gnu_classpath_VMSystemProperties.c \
+		java_lang_VMFloat.c \
+		java_lang_Math.c \
+		java_lang_VMDouble.c \
+		java_lang_VMSystem.c \
 		Class.c \
 		ClassLoader.c \
-		java_lang_VMDouble.c \
-		java_lang_VMFloat.c \
-		Math.c \
 		MemoryAdvice.c \
 		Object.c \
 		PrimordialClassLoader.c \
 		Runtime.c \
 		String.c \
 		System.c \
-		java_lang_VMSystem.c \
 		Thread.c \
 		ThreadStack.c \
 		Throwable.c \
 		UNIXProcess.c \
-		gnu_classpath_VMStackWalker.c \
-		gnu_classpath_VMSystemProperties.c \
 		ZipFile.c
 
 REF_SRCS = \
@@ -554,7 +554,6 @@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libnative_la-ClassLoader.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libnative_la-Constructor.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libnative_la-Field.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libnative_la-Math.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libnative_la-MemoryAdvice.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libnative_la-Method.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libnative_la-Object.Plo at am__quote@
@@ -571,6 +570,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libnative_la-ZipFile.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libnative_la-gnu_classpath_VMStackWalker.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libnative_la-gnu_classpath_VMSystemProperties.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libnative_la-java_lang_Math.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libnative_la-java_lang_VMDouble.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libnative_la-java_lang_VMFloat.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libnative_la-java_lang_VMSystem.Plo at am__quote@
@@ -597,19 +597,33 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
 
-libnative_la-Class.lo: Class.c
- at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -MT libnative_la-Class.lo -MD -MP -MF "$(DEPDIR)/libnative_la-Class.Tpo" -c -o libnative_la-Class.lo `test -f 'Class.c' || echo '$(srcdir)/'`Class.c; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libnative_la-Class.Tpo" "$(DEPDIR)/libnative_la-Class.Plo"; else rm -f "$(DEPDIR)/libnative_la-Class.Tpo"; exit 1; fi
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Class.c' object='libnative_la-Class.lo' libtool=yes @AMDEPBACKSLASH@
+libnative_la-gnu_classpath_VMStackWalker.lo: gnu_classpath_VMStackWalker.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -MT libnative_la-gnu_classpath_VMStackWalker.lo -MD -MP -MF "$(DEPDIR)/libnative_la-gnu_classpath_VMStackWalker.Tpo" -c -o libnative_la-gnu_classpath_VMStackWalker.lo `test -f 'gnu_classpath_VMStackWalker.c' || echo '$(srcdir)/'`gnu_classpath_VMStackWalker.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libnative_la-gnu_classpath_VMStackWalker.Tpo" "$(DEPDIR)/libnative_la-gnu_classpath_VMStackWalker.Plo"; else rm -f "$(DEPDIR)/libnative_la-gnu_classpath_VMStackWalker.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='gnu_classpath_VMStackWalker.c' object='libnative_la-gnu_classpath_VMStackWalker.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -c -o libnative_la-Class.lo `test -f 'Class.c' || echo '$(srcdir)/'`Class.c
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -c -o libnative_la-gnu_classpath_VMStackWalker.lo `test -f 'gnu_classpath_VMStackWalker.c' || echo '$(srcdir)/'`gnu_classpath_VMStackWalker.c
 
-libnative_la-ClassLoader.lo: ClassLoader.c
- at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -MT libnative_la-ClassLoader.lo -MD -MP -MF "$(DEPDIR)/libnative_la-ClassLoader.Tpo" -c -o libnative_la-ClassLoader.lo `test -f 'ClassLoader.c' || echo '$(srcdir)/'`ClassLoader.c; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libnative_la-ClassLoader.Tpo" "$(DEPDIR)/libnative_la-ClassLoader.Plo"; else rm -f "$(DEPDIR)/libnative_la-ClassLoader.Tpo"; exit 1; fi
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='ClassLoader.c' object='libnative_la-ClassLoader.lo' libtool=yes @AMDEPBACKSLASH@
+libnative_la-gnu_classpath_VMSystemProperties.lo: gnu_classpath_VMSystemProperties.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -MT libnative_la-gnu_classpath_VMSystemProperties.lo -MD -MP -MF "$(DEPDIR)/libnative_la-gnu_classpath_VMSystemProperties.Tpo" -c -o libnative_la-gnu_classpath_VMSystemProperties.lo `test -f 'gnu_classpath_VMSystemProperties.c' || echo '$(srcdir)/'`gnu_classpath_VMSystemProperties.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libnative_la-gnu_classpath_VMSystemProperties.Tpo" "$(DEPDIR)/libnative_la-gnu_classpath_VMSystemProperties.Plo"; else rm -f "$(DEPDIR)/libnative_la-gnu_classpath_VMSystemProperties.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='gnu_classpath_VMSystemProperties.c' object='libnative_la-gnu_classpath_VMSystemProperties.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -c -o libnative_la-ClassLoader.lo `test -f 'ClassLoader.c' || echo '$(srcdir)/'`ClassLoader.c
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -c -o libnative_la-gnu_classpath_VMSystemProperties.lo `test -f 'gnu_classpath_VMSystemProperties.c' || echo '$(srcdir)/'`gnu_classpath_VMSystemProperties.c
+
+libnative_la-java_lang_VMFloat.lo: java_lang_VMFloat.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -MT libnative_la-java_lang_VMFloat.lo -MD -MP -MF "$(DEPDIR)/libnative_la-java_lang_VMFloat.Tpo" -c -o libnative_la-java_lang_VMFloat.lo `test -f 'java_lang_VMFloat.c' || echo '$(srcdir)/'`java_lang_VMFloat.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libnative_la-java_lang_VMFloat.Tpo" "$(DEPDIR)/libnative_la-java_lang_VMFloat.Plo"; else rm -f "$(DEPDIR)/libnative_la-java_lang_VMFloat.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='java_lang_VMFloat.c' object='libnative_la-java_lang_VMFloat.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -c -o libnative_la-java_lang_VMFloat.lo `test -f 'java_lang_VMFloat.c' || echo '$(srcdir)/'`java_lang_VMFloat.c
+
+libnative_la-java_lang_Math.lo: java_lang_Math.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -MT libnative_la-java_lang_Math.lo -MD -MP -MF "$(DEPDIR)/libnative_la-java_lang_Math.Tpo" -c -o libnative_la-java_lang_Math.lo `test -f 'java_lang_Math.c' || echo '$(srcdir)/'`java_lang_Math.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libnative_la-java_lang_Math.Tpo" "$(DEPDIR)/libnative_la-java_lang_Math.Plo"; else rm -f "$(DEPDIR)/libnative_la-java_lang_Math.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='java_lang_Math.c' object='libnative_la-java_lang_Math.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -c -o libnative_la-java_lang_Math.lo `test -f 'java_lang_Math.c' || echo '$(srcdir)/'`java_lang_Math.c
 
 libnative_la-java_lang_VMDouble.lo: java_lang_VMDouble.c
 @am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -MT libnative_la-java_lang_VMDouble.lo -MD -MP -MF "$(DEPDIR)/libnative_la-java_lang_VMDouble.Tpo" -c -o libnative_la-java_lang_VMDouble.lo `test -f 'java_lang_VMDouble.c' || echo '$(srcdir)/'`java_lang_VMDouble.c; \
@@ -618,19 +632,26 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -c -o libnative_la-java_lang_VMDouble.lo `test -f 'java_lang_VMDouble.c' || echo '$(srcdir)/'`java_lang_VMDouble.c
 
-libnative_la-java_lang_VMFloat.lo: java_lang_VMFloat.c
- at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -MT libnative_la-java_lang_VMFloat.lo -MD -MP -MF "$(DEPDIR)/libnative_la-java_lang_VMFloat.Tpo" -c -o libnative_la-java_lang_VMFloat.lo `test -f 'java_lang_VMFloat.c' || echo '$(srcdir)/'`java_lang_VMFloat.c; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libnative_la-java_lang_VMFloat.Tpo" "$(DEPDIR)/libnative_la-java_lang_VMFloat.Plo"; else rm -f "$(DEPDIR)/libnative_la-java_lang_VMFloat.Tpo"; exit 1; fi
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='java_lang_VMFloat.c' object='libnative_la-java_lang_VMFloat.lo' libtool=yes @AMDEPBACKSLASH@
+libnative_la-java_lang_VMSystem.lo: java_lang_VMSystem.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -MT libnative_la-java_lang_VMSystem.lo -MD -MP -MF "$(DEPDIR)/libnative_la-java_lang_VMSystem.Tpo" -c -o libnative_la-java_lang_VMSystem.lo `test -f 'java_lang_VMSystem.c' || echo '$(srcdir)/'`java_lang_VMSystem.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libnative_la-java_lang_VMSystem.Tpo" "$(DEPDIR)/libnative_la-java_lang_VMSystem.Plo"; else rm -f "$(DEPDIR)/libnative_la-java_lang_VMSystem.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='java_lang_VMSystem.c' object='libnative_la-java_lang_VMSystem.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -c -o libnative_la-java_lang_VMFloat.lo `test -f 'java_lang_VMFloat.c' || echo '$(srcdir)/'`java_lang_VMFloat.c
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -c -o libnative_la-java_lang_VMSystem.lo `test -f 'java_lang_VMSystem.c' || echo '$(srcdir)/'`java_lang_VMSystem.c
 
-libnative_la-Math.lo: Math.c
- at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -MT libnative_la-Math.lo -MD -MP -MF "$(DEPDIR)/libnative_la-Math.Tpo" -c -o libnative_la-Math.lo `test -f 'Math.c' || echo '$(srcdir)/'`Math.c; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libnative_la-Math.Tpo" "$(DEPDIR)/libnative_la-Math.Plo"; else rm -f "$(DEPDIR)/libnative_la-Math.Tpo"; exit 1; fi
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Math.c' object='libnative_la-Math.lo' libtool=yes @AMDEPBACKSLASH@
+libnative_la-Class.lo: Class.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -MT libnative_la-Class.lo -MD -MP -MF "$(DEPDIR)/libnative_la-Class.Tpo" -c -o libnative_la-Class.lo `test -f 'Class.c' || echo '$(srcdir)/'`Class.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libnative_la-Class.Tpo" "$(DEPDIR)/libnative_la-Class.Plo"; else rm -f "$(DEPDIR)/libnative_la-Class.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Class.c' object='libnative_la-Class.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -c -o libnative_la-Class.lo `test -f 'Class.c' || echo '$(srcdir)/'`Class.c
+
+libnative_la-ClassLoader.lo: ClassLoader.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -MT libnative_la-ClassLoader.lo -MD -MP -MF "$(DEPDIR)/libnative_la-ClassLoader.Tpo" -c -o libnative_la-ClassLoader.lo `test -f 'ClassLoader.c' || echo '$(srcdir)/'`ClassLoader.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libnative_la-ClassLoader.Tpo" "$(DEPDIR)/libnative_la-ClassLoader.Plo"; else rm -f "$(DEPDIR)/libnative_la-ClassLoader.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='ClassLoader.c' object='libnative_la-ClassLoader.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -c -o libnative_la-Math.lo `test -f 'Math.c' || echo '$(srcdir)/'`Math.c
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -c -o libnative_la-ClassLoader.lo `test -f 'ClassLoader.c' || echo '$(srcdir)/'`ClassLoader.c
 
 libnative_la-MemoryAdvice.lo: MemoryAdvice.c
 @am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -MT libnative_la-MemoryAdvice.lo -MD -MP -MF "$(DEPDIR)/libnative_la-MemoryAdvice.Tpo" -c -o libnative_la-MemoryAdvice.lo `test -f 'MemoryAdvice.c' || echo '$(srcdir)/'`MemoryAdvice.c; \
@@ -674,13 +695,6 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -c -o libnative_la-System.lo `test -f 'System.c' || echo '$(srcdir)/'`System.c
 
-libnative_la-java_lang_VMSystem.lo: java_lang_VMSystem.c
- at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -MT libnative_la-java_lang_VMSystem.lo -MD -MP -MF "$(DEPDIR)/libnative_la-java_lang_VMSystem.Tpo" -c -o libnative_la-java_lang_VMSystem.lo `test -f 'java_lang_VMSystem.c' || echo '$(srcdir)/'`java_lang_VMSystem.c; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libnative_la-java_lang_VMSystem.Tpo" "$(DEPDIR)/libnative_la-java_lang_VMSystem.Plo"; else rm -f "$(DEPDIR)/libnative_la-java_lang_VMSystem.Tpo"; exit 1; fi
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='java_lang_VMSystem.c' object='libnative_la-java_lang_VMSystem.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -c -o libnative_la-java_lang_VMSystem.lo `test -f 'java_lang_VMSystem.c' || echo '$(srcdir)/'`java_lang_VMSystem.c
-
 libnative_la-Thread.lo: Thread.c
 @am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -MT libnative_la-Thread.lo -MD -MP -MF "$(DEPDIR)/libnative_la-Thread.Tpo" -c -o libnative_la-Thread.lo `test -f 'Thread.c' || echo '$(srcdir)/'`Thread.c; \
 @am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libnative_la-Thread.Tpo" "$(DEPDIR)/libnative_la-Thread.Plo"; else rm -f "$(DEPDIR)/libnative_la-Thread.Tpo"; exit 1; fi
@@ -708,20 +722,6 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='UNIXProcess.c' object='libnative_la-UNIXProcess.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -c -o libnative_la-UNIXProcess.lo `test -f 'UNIXProcess.c' || echo '$(srcdir)/'`UNIXProcess.c
-
-libnative_la-gnu_classpath_VMStackWalker.lo: gnu_classpath_VMStackWalker.c
- at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -MT libnative_la-gnu_classpath_VMStackWalker.lo -MD -MP -MF "$(DEPDIR)/libnative_la-gnu_classpath_VMStackWalker.Tpo" -c -o libnative_la-gnu_classpath_VMStackWalker.lo `test -f 'gnu_classpath_VMStackWalker.c' || echo '$(srcdir)/'`gnu_classpath_VMStackWalker.c; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libnative_la-gnu_classpath_VMStackWalker.Tpo" "$(DEPDIR)/libnative_la-gnu_classpath_VMStackWalker.Plo"; else rm -f "$(DEPDIR)/libnative_la-gnu_classpath_VMStackWalker.Tpo"; exit 1; fi
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='gnu_classpath_VMStackWalker.c' object='libnative_la-gnu_classpath_VMStackWalker.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -c -o libnative_la-gnu_classpath_VMStackWalker.lo `test -f 'gnu_classpath_VMStackWalker.c' || echo '$(srcdir)/'`gnu_classpath_VMStackWalker.c
-
-libnative_la-gnu_classpath_VMSystemProperties.lo: gnu_classpath_VMSystemProperties.c
- at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -MT libnative_la-gnu_classpath_VMSystemProperties.lo -MD -MP -MF "$(DEPDIR)/libnative_la-gnu_classpath_VMSystemProperties.Tpo" -c -o libnative_la-gnu_classpath_VMSystemProperties.lo `test -f 'gnu_classpath_VMSystemProperties.c' || echo '$(srcdir)/'`gnu_classpath_VMSystemProperties.c; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libnative_la-gnu_classpath_VMSystemProperties.Tpo" "$(DEPDIR)/libnative_la-gnu_classpath_VMSystemProperties.Plo"; else rm -f "$(DEPDIR)/libnative_la-gnu_classpath_VMSystemProperties.Tpo"; exit 1; fi
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='gnu_classpath_VMSystemProperties.c' object='libnative_la-gnu_classpath_VMSystemProperties.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -c -o libnative_la-gnu_classpath_VMSystemProperties.lo `test -f 'gnu_classpath_VMSystemProperties.c' || echo '$(srcdir)/'`gnu_classpath_VMSystemProperties.c
 
 libnative_la-ZipFile.lo: ZipFile.c
 @am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -MT libnative_la-ZipFile.lo -MD -MP -MF "$(DEPDIR)/libnative_la-ZipFile.Tpo" -c -o libnative_la-ZipFile.lo `test -f 'ZipFile.c' || echo '$(srcdir)/'`ZipFile.c; \
===================================================================
Checking out kaffe/libraries/clib/native/Math.c
RCS:  /home/cvs/kaffe/kaffe/libraries/clib/native/Attic/Math.c,v
VERS: 1.7
***************
--- kaffe/libraries/clib/native/Math.c	Thu May 19 12:32:50 2005
+++ /dev/null	Sun Aug  4 19:57:58 2002
@@ -1,106 +0,0 @@
-/*
- * java.lang.Math.c
- *
- * Copyright (c) 1996, 1997
- *	Transvirtual Technologies, Inc.  All rights reserved.
- *
- * See the file "license.terms" for information on usage and redistribution 
- * of this file. 
- */
-
-#include "config.h"
-#include "config-std.h"
-#include <native.h>
-#include <math.h>
-#include "config-math.h"
-#include "java_lang_Math.h"
-
-double
-java_lang_Math_sin(double v)
-{
-	return (sin(v));
-}
-
-double
-java_lang_Math_cos(double v)
-{
-	return (cos(v));
-}
-
-double
-java_lang_Math_tan(double v)
-{
-	return (tan(v));
-}
-
-double
-java_lang_Math_asin(double v)
-{
-	return (asin(v));
-}
-
-double
-java_lang_Math_acos(double v)
-{
-	return (acos(v));
-}
-
-double
-java_lang_Math_atan(double v)
-{
-	return (atan(v));
-}
-
-double
-java_lang_Math_exp(double v)
-{
-	return (exp(v));
-}
-
-double
-java_lang_Math_log(double v)
-{
-	return (log(v));
-}
-
-double
-java_lang_Math_sqrt(double v)
-{
-	return (sqrt(v));
-}
-
-double
-java_lang_Math_IEEEremainder(double v1, double v2)
-{
-	return (IEEERemainder(v1, v2));
-}
-
-double
-java_lang_Math_ceil(double v)
-{
-	return (ceil(v));
-}
-
-double
-java_lang_Math_floor(double v)
-{
-	return (floor(v));
-}
-
-double
-java_lang_Math_rint(double v)
-{
-	return (rint(v));
-}
-
-double
-java_lang_Math_atan2(double v1, double v2)
-{
-	return (atan2(v1, v2));
-}
-
-double
-java_lang_Math_pow0(double v1, double v2)
-{
-	return (pow(v1, v2));
-}
===================================================================
Checking out kaffe/libraries/clib/native/java_lang_Math.c
RCS:  /home/cvs/kaffe/kaffe/libraries/clib/native/java_lang_Math.c,v
VERS: 1.1
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/libraries/clib/native/java_lang_Math.c	Thu May 19 12:32:50 2005
@@ -0,0 +1,161 @@
+/* Math.c - java.lang.Math native functions
+   Copyright (C) 1998, 1999, 2004 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+ 
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+#include <config.h>
+#include <java_lang_Math.h>
+#include <fdlibm.h>
+
+JNIEXPORT jdouble JNICALL
+Java_java_lang_Math_sin
+  (JNIEnv * env __attribute__ ((__unused__)),
+   jclass cls __attribute__ ((__unused__)), jdouble x)
+{
+  return sin (x);
+}
+
+JNIEXPORT jdouble JNICALL
+Java_java_lang_Math_cos
+  (JNIEnv * env __attribute__ ((__unused__)),
+   jclass cls __attribute__ ((__unused__)), jdouble x)
+{
+  return cos (x);
+}
+
+JNIEXPORT jdouble JNICALL
+Java_java_lang_Math_tan
+  (JNIEnv * env __attribute__ ((__unused__)),
+   jclass cls __attribute__ ((__unused__)), jdouble x)
+{
+  return tan (x);
+}
+
+JNIEXPORT jdouble JNICALL
+Java_java_lang_Math_asin
+  (JNIEnv * env __attribute__ ((__unused__)),
+   jclass cls __attribute__ ((__unused__)), jdouble x)
+{
+  return asin (x);
+}
+
+JNIEXPORT jdouble JNICALL
+Java_java_lang_Math_acos
+  (JNIEnv * env __attribute__ ((__unused__)),
+   jclass cls __attribute__ ((__unused__)), jdouble x)
+{
+  return acos (x);
+}
+
+JNIEXPORT jdouble JNICALL
+Java_java_lang_Math_atan
+  (JNIEnv * env __attribute__ ((__unused__)),
+   jclass cls __attribute__ ((__unused__)), jdouble x)
+{
+  return atan (x);
+}
+
+JNIEXPORT jdouble JNICALL
+Java_java_lang_Math_atan2
+  (JNIEnv * env __attribute__ ((__unused__)),
+   jclass cls __attribute__ ((__unused__)), jdouble y, jdouble x)
+{
+  return atan2 (y, x);
+}
+
+JNIEXPORT jdouble JNICALL
+Java_java_lang_Math_exp
+  (JNIEnv * env __attribute__ ((__unused__)),
+   jclass cls __attribute__ ((__unused__)), jdouble x)
+{
+  return exp (x);
+}
+
+JNIEXPORT jdouble JNICALL
+Java_java_lang_Math_log
+  (JNIEnv * env __attribute__ ((__unused__)),
+   jclass cls __attribute__ ((__unused__)), jdouble x)
+{
+  return log (x);
+}
+
+JNIEXPORT jdouble JNICALL
+Java_java_lang_Math_sqrt
+  (JNIEnv * env __attribute__ ((__unused__)),
+   jclass cls __attribute__ ((__unused__)), jdouble x)
+{
+  return sqrt (x);
+}
+
+JNIEXPORT jdouble JNICALL
+Java_java_lang_Math_pow
+  (JNIEnv * env __attribute__ ((__unused__)),
+   jclass cls __attribute__ ((__unused__)), jdouble x, jdouble y)
+{
+  return pow (x, y);
+}
+
+JNIEXPORT jdouble JNICALL
+Java_java_lang_Math_IEEEremainder
+  (JNIEnv * env __attribute__ ((__unused__)),
+   jclass cls __attribute__ ((__unused__)), jdouble x, jdouble y)
+{
+  return remainder (x, y);
+}
+
+JNIEXPORT jdouble JNICALL
+Java_java_lang_Math_ceil
+  (JNIEnv * env __attribute__ ((__unused__)),
+   jclass cls __attribute__ ((__unused__)), jdouble x)
+{
+  return ceil (x);
+}
+
+JNIEXPORT jdouble JNICALL
+Java_java_lang_Math_floor
+  (JNIEnv * env __attribute__ ((__unused__)),
+   jclass cls __attribute__ ((__unused__)), jdouble x)
+{
+  return floor (x);
+}
+
+JNIEXPORT jdouble JNICALL
+Java_java_lang_Math_rint
+  (JNIEnv * env __attribute__ ((__unused__)),
+   jclass cls __attribute__ ((__unused__)), jdouble x)
+{
+  return rint (x);
+}
===================================================================
Checking out kaffe/libraries/javalib/java/lang/Math.java
RCS:  /home/cvs/kaffe/kaffe/libraries/javalib/java/lang/Math.java,v
VERS: 1.12
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/libraries/javalib/java/lang/Math.java	Thu May 19 12:32:50 2005
@@ -0,0 +1,650 @@
+/* java.lang.Math -- common mathematical functions, native allowed
+   Copyright (C) 1998, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.lang;
+
+import gnu.classpath.Configuration;
+
+import java.util.Random;
+
+/**
+ * Helper class containing useful mathematical functions and constants.
+ * <P>
+ *
+ * Note that angles are specified in radians.  Conversion functions are
+ * provided for your convenience.
+ *
+ * @author Paul Fisher
+ * @author John Keiser
+ * @author Eric Blake (ebb9 at email.byu.edu)
+ * @since 1.0
+ */
+public final class Math
+{
+  /**
+   * Math is non-instantiable
+   */
+  private Math()
+  {
+  }
+
+  static
+  {
+    if (Configuration.INIT_LOAD_LIBRARY)
+      {
+	System.loadLibrary("native");
+      }
+  }
+
+  /**
+   * A random number generator, initialized on first use.
+   */
+  private static Random rand;
+
+  /**
+   * The most accurate approximation to the mathematical constant <em>e</em>:
+   * <code>2.718281828459045</code>. Used in natural log and exp.
+   *
+   * @see #log(double)
+   * @see #exp(double)
+   */
+  public static final double E = 2.718281828459045;
+
+  /**
+   * The most accurate approximation to the mathematical constant <em>pi</em>:
+   * <code>3.141592653589793</code>. This is the ratio of a circle's diameter
+   * to its circumference.
+   */
+  public static final double PI = 3.141592653589793;
+
+  /**
+   * Take the absolute value of the argument.
+   * (Absolute value means make it positive.)
+   * <P>
+   *
+   * Note that the the largest negative value (Integer.MIN_VALUE) cannot
+   * be made positive.  In this case, because of the rules of negation in
+   * a computer, MIN_VALUE is what will be returned.
+   * This is a <em>negative</em> value.  You have been warned.
+   *
+   * @param i the number to take the absolute value of
+   * @return the absolute value
+   * @see Integer#MIN_VALUE
+   */
+  public static int abs(int i)
+  {
+    return (i < 0) ? -i : i;
+  }
+
+  /**
+   * Take the absolute value of the argument.
+   * (Absolute value means make it positive.)
+   * <P>
+   *
+   * Note that the the largest negative value (Long.MIN_VALUE) cannot
+   * be made positive.  In this case, because of the rules of negation in
+   * a computer, MIN_VALUE is what will be returned.
+   * This is a <em>negative</em> value.  You have been warned.
+   *
+   * @param l the number to take the absolute value of
+   * @return the absolute value
+   * @see Long#MIN_VALUE
+   */
+  public static long abs(long l)
+  {
+    return (l < 0) ? -l : l;
+  }
+
+  /**
+   * Take the absolute value of the argument.
+   * (Absolute value means make it positive.)
+   * <P>
+   *
+   * This is equivalent, but faster than, calling
+   * <code>Float.intBitsToFloat(0x7fffffff & Float.floatToIntBits(a))</code>.
+   *
+   * @param f the number to take the absolute value of
+   * @return the absolute value
+   */
+  public static float abs(float f)
+  {
+    return (f <= 0) ? 0 - f : f;
+  }
+
+  /**
+   * Take the absolute value of the argument.
+   * (Absolute value means make it positive.)
+   *
+   * This is equivalent, but faster than, calling
+   * <code>Double.longBitsToDouble(Double.doubleToLongBits(a)
+   *       &lt;&lt; 1) &gt;&gt;&gt; 1);</code>.
+   *
+   * @param d the number to take the absolute value of
+   * @return the absolute value
+   */
+  public static double abs(double d)
+  {
+    return (d <= 0) ? 0 - d : d;
+  }
+
+  /**
+   * Return whichever argument is smaller.
+   *
+   * @param a the first number
+   * @param b a second number
+   * @return the smaller of the two numbers
+   */
+  public static int min(int a, int b)
+  {
+    return (a < b) ? a : b;
+  }
+
+  /**
+   * Return whichever argument is smaller.
+   *
+   * @param a the first number
+   * @param b a second number
+   * @return the smaller of the two numbers
+   */
+  public static long min(long a, long b)
+  {
+    return (a < b) ? a : b;
+  }
+
+  /**
+   * Return whichever argument is smaller. If either argument is NaN, the
+   * result is NaN, and when comparing 0 and -0, -0 is always smaller.
+   *
+   * @param a the first number
+   * @param b a second number
+   * @return the smaller of the two numbers
+   */
+  public static float min(float a, float b)
+  {
+    // this check for NaN, from JLS 15.21.1, saves a method call
+    if (a != a)
+      return a;
+    // no need to check if b is NaN; < will work correctly
+    // recall that -0.0 == 0.0, but [+-]0.0 - [+-]0.0 behaves special
+    if (a == 0 && b == 0)
+      return -(-a - b);
+    return (a < b) ? a : b;
+  }
+
+  /**
+   * Return whichever argument is smaller. If either argument is NaN, the
+   * result is NaN, and when comparing 0 and -0, -0 is always smaller.
+   *
+   * @param a the first number
+   * @param b a second number
+   * @return the smaller of the two numbers
+   */
+  public static double min(double a, double b)
+  {
+    // this check for NaN, from JLS 15.21.1, saves a method call
+    if (a != a)
+      return a;
+    // no need to check if b is NaN; < will work correctly
+    // recall that -0.0 == 0.0, but [+-]0.0 - [+-]0.0 behaves special
+    if (a == 0 && b == 0)
+      return -(-a - b);
+    return (a < b) ? a : b;
+  }
+
+  /**
+   * Return whichever argument is larger.
+   *
+   * @param a the first number
+   * @param b a second number
+   * @return the larger of the two numbers
+   */
+  public static int max(int a, int b)
+  {
+    return (a > b) ? a : b;
+  }
+
+  /**
+   * Return whichever argument is larger.
+   *
+   * @param a the first number
+   * @param b a second number
+   * @return the larger of the two numbers
+   */
+  public static long max(long a, long b)
+  {
+    return (a > b) ? a : b;
+  }
+
+  /**
+   * Return whichever argument is larger. If either argument is NaN, the
+   * result is NaN, and when comparing 0 and -0, 0 is always larger.
+   *
+   * @param a the first number
+   * @param b a second number
+   * @return the larger of the two numbers
+   */
+  public static float max(float a, float b)
+  {
+    // this check for NaN, from JLS 15.21.1, saves a method call
+    if (a != a)
+      return a;
+    // no need to check if b is NaN; > will work correctly
+    // recall that -0.0 == 0.0, but [+-]0.0 - [+-]0.0 behaves special
+    if (a == 0 && b == 0)
+      return a - -b;
+    return (a > b) ? a : b;
+  }
+
+  /**
+   * Return whichever argument is larger. If either argument is NaN, the
+   * result is NaN, and when comparing 0 and -0, 0 is always larger.
+   *
+   * @param a the first number
+   * @param b a second number
+   * @return the larger of the two numbers
+   */
+  public static double max(double a, double b)
+  {
+    // this check for NaN, from JLS 15.21.1, saves a method call
+    if (a != a)
+      return a;
+    // no need to check if b is NaN; > will work correctly
+    // recall that -0.0 == 0.0, but [+-]0.0 - [+-]0.0 behaves special
+    if (a == 0 && b == 0)
+      return a - -b;
+    return (a > b) ? a : b;
+  }
+
+  /**
+   * The trigonometric function <em>sin</em>. The sine of NaN or infinity is
+   * NaN, and the sine of 0 retains its sign. This is accurate within 1 ulp,
+   * and is semi-monotonic.
+   *
+   * @param a the angle (in radians)
+   * @return sin(a)
+   */
+  public static native double sin(double a);
+
+  /**
+   * The trigonometric function <em>cos</em>. The cosine of NaN or infinity is
+   * NaN. This is accurate within 1 ulp, and is semi-monotonic.
+   *
+   * @param a the angle (in radians)
+   * @return cos(a)
+   */
+  public static native double cos(double a);
+
+  /**
+   * The trigonometric function <em>tan</em>. The tangent of NaN or infinity
+   * is NaN, and the tangent of 0 retains its sign. This is accurate within 1
+   * ulp, and is semi-monotonic.
+   *
+   * @param a the angle (in radians)
+   * @return tan(a)
+   */
+  public static native double tan(double a);
+
+  /**
+   * The trigonometric function <em>arcsin</em>. The range of angles returned
+   * is -pi/2 to pi/2 radians (-90 to 90 degrees). If the argument is NaN or
+   * its absolute value is beyond 1, the result is NaN; and the arcsine of
+   * 0 retains its sign. This is accurate within 1 ulp, and is semi-monotonic.
+   *
+   * @param a the sin to turn back into an angle
+   * @return arcsin(a)
+   */
+  public static native double asin(double a);
+
+  /**
+   * The trigonometric function <em>arccos</em>. The range of angles returned
+   * is 0 to pi radians (0 to 180 degrees). If the argument is NaN or
+   * its absolute value is beyond 1, the result is NaN. This is accurate
+   * within 1 ulp, and is semi-monotonic.
+   *
+   * @param a the cos to turn back into an angle
+   * @return arccos(a)
+   */
+  public static native double acos(double a);
+
+  /**
+   * The trigonometric function <em>arcsin</em>. The range of angles returned
+   * is -pi/2 to pi/2 radians (-90 to 90 degrees). If the argument is NaN, the
+   * result is NaN; and the arctangent of 0 retains its sign. This is accurate
+   * within 1 ulp, and is semi-monotonic.
+   *
+   * @param a the tan to turn back into an angle
+   * @return arcsin(a)
+   * @see #atan2(double, double)
+   */
+  public static native double atan(double a);
+
+  /**
+   * A special version of the trigonometric function <em>arctan</em>, for
+   * converting rectangular coordinates <em>(x, y)</em> to polar
+   * <em>(r, theta)</em>. This computes the arctangent of x/y in the range
+   * of -pi to pi radians (-180 to 180 degrees). Special cases:<ul>
+   * <li>If either argument is NaN, the result is NaN.</li>
+   * <li>If the first argument is positive zero and the second argument is
+   * positive, or the first argument is positive and finite and the second
+   * argument is positive infinity, then the result is positive zero.</li>
+   * <li>If the first argument is negative zero and the second argument is
+   * positive, or the first argument is negative and finite and the second
+   * argument is positive infinity, then the result is negative zero.</li>
+   * <li>If the first argument is positive zero and the second argument is
+   * negative, or the first argument is positive and finite and the second
+   * argument is negative infinity, then the result is the double value
+   * closest to pi.</li>
+   * <li>If the first argument is negative zero and the second argument is
+   * negative, or the first argument is negative and finite and the second
+   * argument is negative infinity, then the result is the double value
+   * closest to -pi.</li>
+   * <li>If the first argument is positive and the second argument is
+   * positive zero or negative zero, or the first argument is positive
+   * infinity and the second argument is finite, then the result is the
+   * double value closest to pi/2.</li>
+   * <li>If the first argument is negative and the second argument is
+   * positive zero or negative zero, or the first argument is negative
+   * infinity and the second argument is finite, then the result is the
+   * double value closest to -pi/2.</li>
+   * <li>If both arguments are positive infinity, then the result is the
+   * double value closest to pi/4.</li>
+   * <li>If the first argument is positive infinity and the second argument
+   * is negative infinity, then the result is the double value closest to
+   * 3*pi/4.</li>
+   * <li>If the first argument is negative infinity and the second argument
+   * is positive infinity, then the result is the double value closest to
+   * -pi/4.</li>
+   * <li>If both arguments are negative infinity, then the result is the
+   * double value closest to -3*pi/4.</li>
+   *
+   * </ul><p>This is accurate within 2 ulps, and is semi-monotonic. To get r,
+   * use sqrt(x*x+y*y).
+   *
+   * @param y the y position
+   * @param x the x position
+   * @return <em>theta</em> in the conversion of (x, y) to (r, theta)
+   * @see #atan(double)
+   */
+  public static native double atan2(double y, double x);
+
+  /**
+   * Take <em>e</em><sup>a</sup>.  The opposite of <code>log()</code>. If the
+   * argument is NaN, the result is NaN; if the argument is positive infinity,
+   * the result is positive infinity; and if the argument is negative
+   * infinity, the result is positive zero. This is accurate within 1 ulp,
+   * and is semi-monotonic.
+   *
+   * @param a the number to raise to the power

*** Patch too long, truncated ***




More information about the kaffe mailing list