Math class defines the mathematical methods in java.lang. Constants defined by math class:

PI: 3.14

E: 2.72

**Transcendental and trigonometric methods in Math class:**

**sin( ) method:** It is used to return sine of angle in radians.

Syntax:

static double sin(double theta)

**asin( ) method:** It is used to return arc sine of angle in radians.

Syntax:

static double asin(double theta)

**cos( ) method:** It is used to return cosine of angle in radians.

Syntax:

static double cos(double theta)

**acos( ) method:** It is used to return arc cosine of angle in radians.

Syntax:

static double acos(double theta)

**tan( ) method:** It is used to return tangent of angle in radians.

Syntax:

static double tan(double theta)

**atan( ) method:** It is used to return arc tangent of angle in radians.

Syntax:

static double atan(double theta)

**atan2( ) method:** It is used to return tangent if a/b.

Syntax:

static double atan2(double a, double b)

**Exponential methods in Math class:**

**exp( ) method:** It is used to return e to a.

Syntax:

static double exp(double a)

**pow( ) method:** It is used to return a raised to b

Syntax:

static double pow(double a, double b)

**sqrt( ) method:** It is used to return square root of a.

Syntax:

static double sqrt(double a)

**log( ) method:** It is used to return natural logarithm of a.

Syntax:

static double log(double a)

## Leave a Reply