Built-in Math Functions


Fortran is superior to Java (or to C or C++ for that matter) in its mathematical functions that are either intrinsic to the language or available through the commercially available Fortran libraries. The NAG Fortran Libraries have functions to compute gamma functions, Bessel functions, error functions, Fresnel integrals, and elliptic integrals, to name a few.

The Java libraries provide built-in functions to compute absolute value, power, square root, transcendental , trigonometric, rounding, and other mathematical functions. The Java math methods are modeled after the algorithms found in the 1995 version of the Freely Distributable Math Library ( fdlibm ) package. There is nothing exotic in the Java math capability. There is nothing to compute a Bessel function or anything like that, for example.

That being said, there is nothing to prevent you or someone else from creating Java mathematical function libraries that match or exceed the Fortran capability. The Java Native Interface (JNI) can be used to call external native routines. Indeed, as more and more scientific and engineering programmers move over to Java, extensive math libraries will become available. We will see how to create user -defined Java math functions in Chapter 17.



Technical Java. Applications for Science and Engineering
Technical Java: Applications for Science and Engineering
ISBN: 0131018159
EAN: 2147483647
Year: 2003
Pages: 281
Authors: Grant Palmer

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net