Chapter 17. User-Defined Math Functions

In the previous chapter, we covered the built-in math capability of Java. The intrinsic math capability of Java is similar to that provided by C and C++. Among the methods Java defines are those that compute trigonometric, natural logarithm, power, square root, and exponential functions. There are some holes in the intrinsic Java math functionality—there are no hyperbolic trigonometric functions for instance, and there is nothing exotic such as methods to compute gamma or Bessel functions.

One of the great strengths of Java is that it is easily expandable. If the Java libraries don't provide certain functionality, it is a relatively simple matter to add that yourself. In this chapter, we will show you how ...

Get Technical Java™: Developing Scientific and Engineering Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.