img
The next methods take as a parameter the result of a transcendental function and return,
in radians, the angle that would produce that result. They are the inverse of their non-arc
companions.
Method
Description
static double asin(double arg)
Returns the angle whose sine is specified by arg.
static double acos(double arg)
Returns the angle whose cosine is specified by arg.
static double atan(double arg)
Returns the angle whose tangent is specified by arg.
static double atan2(double x, double y) Returns the angle whose tangent is x/y.
The next methods compute the hyperbolic sine, cosine, and tangent of an angle.
Method
Description
static double sinh(double arg)
Returns the hyperbolic sine of the angle specified by arg.
static double cosh(double arg)
Returns the hyperbolic cosine of the angle specified by arg.
static double tanh(double arg)
Returns the hyperbolic tangent of the angle specified by arg.
Exponential Functions
Math defines the following exponential methods:
Method
Description
static double cbr t(double arg)
Returns the cube root of arg.
static double exp(double arg)
Returns e to the arg.
static double expm1(double arg)
Returns e to the arg­1
static double log(double arg)
Returns the natural logarithm of arg.
static double log10(double arg)
Returns the base 10 logarithm for arg.
static double log1p(double arg)
Returns the natural logarithm for arg + 1.
static double pow(double y, double x)
Returns y raised to the x; for example, pow(2.0, 3.0)
returns 8.0.
factor
static double scalb(double arg, int factor) Returns val × 2  . (Added by Java SE 6.)
factor
static float scalb(float arg, int factor)
Returns val × 2
. (Added by Java SE 6.)
static double sqr t(double arg)
Returns the square root of arg.
Rounding Functions
The Math class defines several methods that provide various types of rounding operations.
They are shown in Table 16-16. Notice the two ulp( ) methods at the end of the table. In this
context, ulp stands for units in the last place. It indicates the number of units between a value
and the next higher value. It can be used to help assess the accuracy of a result.
Search WWH :
Custom Search
Previous Page
Java SE 6 Topic Index
Next Page
Java SE 6 Bookmarks
Home