20.11
java.lang.Math
THE PACKAGE JAVA.LANG
To ensure portability of Java programs, the specifications of many of the
numerical functions in this package require that they produce the same results as
certain published algorithms. These algorithms are available from the well known
network library
netlib
as the package
fdlibm
( Freely Distributable Math
Library ). These algorithms, which are written in the C programming language,
are to be understood as if executed in Java execution order with all floating point
operations following the rules of Java floating point arithmetic.
The network library may be found at
http://netlib.att.com
on the World
Wide Web; then perform a keyword search for
fdlibm
. The library may also be
retrieved by E mail; to begin the process, send a message containing the line:
send index from fdlibm
to
netlib@research.att.com
. The Java math library is defined with respect to
the version of
fdlibm
dated 95/01/04. Where
fdlibm
provides more than one def
inition for a function (such as
acos
), the IEEE754 core function version is to be
used (residing in a file whose name begins with the letter
e
).
A complete and self contained description of the algorithms to be used for
these functions will be provided in a future version of this specification. It is also
anticipated that the algorithms will be coded in Java to provide a reference imple
mentation that is not tied to
fdlibm
.
20.11.1
public static final double E = 2.7182818284590452354;
The constant value of this field is the
double
value that is closer than any other
to
e
, the base of the natural logarithms.
20.11.2
public static final double PI = 3.14159265358979323846;
The constant value of this field is the
double
value that is closer than any other
to
, the ratio of the circumference of a circle to its diameter.
20.11.3
public static double sin(double a)
This method computes an approximation to the sine of the argument, using the
sin
algorithm as published in
fdlibm
(see the introduction to this section).
Special cases:
If the argument is NaN or an infinity, then the result is NaN.
If the argument is positive zero, then the result is positive zero; if the argu
ment is negative zero, then the result is negative zero.
518
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved