The attached patch adds the proposed documentation changes mentioned
earlier by Mark. A fix is on the way for the Darwin problem with the
changes in fdlibm.
Changelog:
2006-02-24 Andrew John Hughes <[EMAIL PROTECTED]>
* NEWS: Mentions the VMMath runtime changes.
* doc/vmintegration.texinfo: Updated to include
VMMath.
--
Andrew :-)
Please avoid sending me Microsoft Office (e.g. Word, PowerPoint)
attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html
If you use Microsoft Office, support movement towards the end of vendor
lock-in:
http://opendocumentfellowship.org/petition/
"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
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
public class gcj extends Freedom implements Java { ... }
Index: NEWS
===================================================================
RCS file: /sources/classpath/classpath/NEWS,v
retrieving revision 1.113
diff -u -3 -p -u -r1.113 NEWS
--- NEWS 20 Feb 2006 08:49:38 -0000 1.113
+++ NEWS 24 Feb 2006 12:36:49 -0000
@@ -19,6 +19,12 @@ New in release 0.21 (to be released)
classes. The rmic compiler is no longer required (unless for research
and specific stubs).
+Runtime interface changes:
+
+* A new class, VMMath, is now available which separates the native
+ mathematical functions from java.lang.Math. The previous fdlibm
+ implementation now forms the reference material for this class.
+
New in release 0.20 (Jan 13, 2006)
* New StAX pull parser and SAX-over-StAX driver. Lots of DOM, SAX/StAX,
Index: doc/vmintegration.texinfo
===================================================================
RCS file: /sources/classpath/classpath/doc/vmintegration.texinfo,v
retrieving revision 1.21
diff -u -3 -p -u -r1.21 vmintegration.texinfo
--- doc/vmintegration.texinfo 16 Jan 2006 13:18:31 -0000 1.21
+++ doc/vmintegration.texinfo 24 Feb 2006 12:36:55 -0000
@@ -227,6 +227,7 @@ become operable.
* java.lang.VMString::
* java.lang.VMThread::
* java.lang.VMInstrumentationImpl::
+* java.lang.VMMath::
@end menu
@node java.lang.VMClass, java.lang.VMObject ,java.lang,java.lang
@@ -684,7 +685,7 @@ having returned true, and is thus deprec
@end itemize
@end itemize
[EMAIL PROTECTED] java.lang.VMInstrumentationImpl,, java.lang.VMThread, java.lang
[EMAIL PROTECTED] java.lang.VMInstrumentationImpl, java.lang.VMMath, java.lang.VMThread, java.lang
@subsection @code{java.lang.VMInstrumentationImpl}
The @code{java.lang.VMInstrumentationImpl} and
@@ -709,7 +710,7 @@ by a specific class loader.
@end itemize
Instrumentation allows to modify the bytecode of a class before it gets read
-by the VM. In Gnu Classpath, the @code{ClassLoader.defineClass} method calls
+by the VM. In GNU Classpath, the @code{ClassLoader.defineClass} method calls
the @code{VMClassLoader.defineClassWithTransformers} method which first checks
if @code{VMClassLoader.instrumenter} is @code{null}. If it's the case, it
directly calls @code{VMClassLoader.defineClass}. If it's not the case, the
@@ -718,7 +719,6 @@ which calls each transformer registered
object and returns a new bytecode array. Then, it calls the
@code{VMClassLoader.defineClass} method with this new bytecode array.
-
The second use of instrumentation is to redefine a class after it has been
loaded by the VM. This is done in the Java application by calling the
@code{Instrumentation.redefineClasses} method of the standard interface on
@@ -727,6 +727,55 @@ method calls the @code{VMInstrumentation
which must be implemented by the VM. The implementation should call the
@code{InstrumentationImpl.callTransformers} method.
[EMAIL PROTECTED] java.lang.VMMath, , java.lang.VMInstrumentationImpl, java.lang
[EMAIL PROTECTED] @code{java.lang.VMMath}
+
+The @code{VMMath} class provides a series of native methods
+for some of the mathematical functions present in @code{java.lang.Math}.
+Classpath provides a default implementation of these which maps the
+functions to those provided by @code{fdlibm}. VM implementors are welcome
+to replace this with more efficent implementations, as long as the accuracy
+contract of these methods, specified in @code{java.lang.Math}, is maintained.
+
[EMAIL PROTECTED] @bullet
[EMAIL PROTECTED] 1.0
[EMAIL PROTECTED] @bullet
[EMAIL PROTECTED] @code{sin(double)} -- Returns the sine value for the given angle.
[EMAIL PROTECTED] @code{cos(double)} -- Returns the cosine value for the given angle.
[EMAIL PROTECTED] @code{tan(double)} -- Returns the tangent value for the given angle.
[EMAIL PROTECTED] @code{asin(double)} -- Returns the arc sine value for the given angle.
[EMAIL PROTECTED] @code{acos(double)} -- Returns the arc cosine value for the given angle.
[EMAIL PROTECTED] @code{atan(double)} -- Returns the arc tangent value for the given angle.
[EMAIL PROTECTED] @code{atan2(double,double)} -- Returns the arc tangent of the ratio of
+the two arguments.
[EMAIL PROTECTED] @code{exp(double)} -- Returns the exponent raised to the given power.
[EMAIL PROTECTED] @code{log(double)} -- Returns the natural logarithm for the given value.
[EMAIL PROTECTED] @code{sqrt(double)} -- Returns the square root of the value.
[EMAIL PROTECTED] @code{pow(double,double)} -- Returns x to the power of y.
[EMAIL PROTECTED] @code{IEEEremainder(double,double)} -- Returns the IEEE 754 remainder
+for the two values.
[EMAIL PROTECTED] @code{ceil(double)} -- Returns the nearest integer >= the value.
[EMAIL PROTECTED] @code{floor(double)} -- Returns the nearest integer <= the value.
[EMAIL PROTECTED] @code{rint(double)} -- Returns the nearest integer or the even one
+if the distance between the two is equal.
[EMAIL PROTECTED] itemize
[EMAIL PROTECTED] 1.5
[EMAIL PROTECTED] @bullet
[EMAIL PROTECTED] @code{cbrt(double)} -- Returns the cube root of the value.
[EMAIL PROTECTED] @code{cosh(double)} -- Returns the hyperbolic cosine value for the given
+angle.
[EMAIL PROTECTED] @code{expm1(double)} -- Returns the exponent of the value minus one.
[EMAIL PROTECTED] @code{hypot(double,double)} -- Returns the hypotenuse corresponding to
+x and y.
[EMAIL PROTECTED] @code{log10(double)} -- Returns the base 10 logarithm of the given value.
[EMAIL PROTECTED] @code{log1p(double)} -- Returns the natural logarithm of the value plus
+one.
[EMAIL PROTECTED] @code{sinh(double)} -- Returns the hyperbolic sine value for the given
+angle.
[EMAIL PROTECTED] @code{tanh(double)} -- Returns the hyperbolic tangent value for the given angle.
[EMAIL PROTECTED] itemize
[EMAIL PROTECTED] itemize
+
@node gnu.classpath, java.util, java.lang, Classpath Hooks
@section @code{gnu.classpath}