Transcendental Functions

The following three methods accept a double parameter for an angle in radians and return the result of their respective transcendental function:

Method                                                                                    Description’
static double sin(double nrg)                               Returns thesine of the angle specified
by nrg in radians.
static double costdouble arg                                Returns the cosine of the angle specified
bY’ nrg in rndians.

static double tan(double arg)                              Returns the tangent of the angle
specified by arg in radians.

Exponential Functions

Math defines the following exponential methods:

Method                                                                                       Description
static double exp(double org)                               Returns e to the nrg.
static double log(double org)                                Returns the natural logarithm of arg.

static double powt double y, double x)                Returns y raised to’ the x; for example, pow(2.0, 3.0) returns 8.0
static double sort(double arg)                               Returns the square root of argo

Rounding Functions

The Math class defines sever~l methods that provide various types of rounding operations. They are shown in Table.14-15.

[vfb id=1]

Share This