Perl Tutorial Perl References

Perl Math Functions



The Perl has a number of functions that are available for performing basic numeric operations such as elementary exponential, logarithmic, root and trigonometric functions. These functions are listed below. For more details about any one of these, please visit its page.

Perl Math Functions

Trigonometric Functions

FunctionsDescription
sin() Returns the trigonometric sine of an angle.
cos() Returns the trigonometric cosine of an angle.
tan() Returns the trigonometric tangent of an angle.
asin() Returns the arc sine of a value.
acos() Returns the arc cosine of a value.
atan() Returns the arc tangent of a value.

Hyperbolic Functions

FunctionsDescription
sinh() Returns the hyperbolic sine of a value.
cosh() Returns the hyperbolic cosine of a value.
tanh() Returns the hyperbolic tangent of a value.
asinh() Returns the complex inverse hyperbolic sine of a complex number.
acosh() Returns the complex inverse hyperbolic cosine of a complex number.
atanh() Returns the complex inverse hyperbolic tangent of a complex number.

Angular Conversion

FunctionsDescription
rad2deg() Returns an angle measured in radians to an approx. equivalent angle measured in degrees.
deg2rad() Returns an angle measured in degrees to an approx. equivalent angle measured in radians.