On Mon, 2006-02-06 at 21:58 +0000, Andrew John Hughes wrote: > I'd welcome any comments on the attached patch, > which separates the Math native methods into a separate > class, VMMath, so that they can optionally be replaced > by the VM. This fixes PR22198. > > I also have code for most of the new Math methods here > as well. However, I've had some problems in using the methods > for these in fdlibm. Namely, > > a) Existing methods such as sinh produce a linking error for > ClasspathSinH or something like that which seems to be something > to do with namespace.h. > > b) Two of the methods require an update from 5.1 to 5.3 of fdlibm. > Merely adding the two new c files to Makefile.am didn't seem to work > (they don't seem to be being built). The methods are log1p and expm1. > > I'd appreciate some info. from anyone who knows how fdlibm works with > Classpath. At worst, I can simply commit the code I have and someone > else can link these in, but it would be nice to know how to do this. > I'm guessing that mprec is separate from fdlibm although it appears in > the same directory; I recall there was talk of an update of this as well > to probably handle 64-bit support. > > Changelog: > > 2006-02-06 Andrew John Hughes <[EMAIL PROTECTED]> > > * include/Makefile.am: > Swapped Math.h for VMMath.h > * include/java_lang_Math.h: > Removed. > * include/java_lang_VMMath.h: > New autogenerated header for the new class. > * java/lang/Math.java: > (sin(double)): Changed to link to VMMath. > (cos(double)): Changed to link to VMMath. > (tan(double)): Changed to link to VMMath. > (asin(double)): Changed to link to VMMath. > (acos(double)): Changed to link to VMMath. > (atan(double)): Changed to link to VMMath. > (atan2(double)): Changed to link to VMMath. > (exp(double)): Changed to link to VMMath. > (log(double)): Changed to link to VMMath. > (sqrt(double)): Changed to link to VMMath. > (pow(double,double)): Changed to link to VMMath. > (IEEEremainder(double,double)): Changed to link to VMMath. > (ceil(double)): Changed to link to VMMath. > (floor(double)): Changed to link to VMMath. > (rint(double)): Changed to link to VMMath. > * native/jni/java-lang/Makefile.am: > Replaced java_lang_Math.c with java_lang_VMMath.c > * native/jni/java-lang/java_lang_Math.c: > Removed. > * native/jni/java-lang/java_lang_VMMath.c: > Renamed from java_lang_Math.c. > * vm/reference/java/lang/VMMath.java: > New class. > (sin(double)): New native method. > (cos(double)): New native method. > (tan(double)): New native method. > (asin(double)): New native method. > (acos(double)): New native method. > (atan(double)): New native method. > (atan2(double)): New native method. > (exp(double)): New native method. > (log(double)): New native method. > (sqrt(double)): New native method. > (pow(double,double)): New native method. > (IEEEremainder(double,double)): New native method. > (ceil(double)): New native method. > (floor(double)): New native method. > (rint(double)): New native method. > Committed. -- Andrew :-)
Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments. See http://www.fsf.org/philosophy/no-word-attachments.html Support OpenDocument instead. http://opendocumentfellowship.org Escape the Java Trap with GNU Classpath! http://www.gnu.org/philosophy/java-trap.html public class gcj extends Freedom implements Java { ... } "Value your freedom, or you will lose it, teaches history. `Don't bother us with politics' respond those who don't want to learn." -- Richard Stallman
