Perl in a Nutshell

Perl in a NutshellSearch this book
Previous: 8.107 Math::ComplexChapter 8
Standard Modules
Next: 8.109 NDBM_File
 

8.108 Math::Trig

Defines many trigonometric functions not defined by the core Perl, plus the constant pi and some additional functions for converting angles. For example:

use Math::Trig;
            
$x = tan(0.9);
$halfpi = pi/2;
The following functions are defined. A slash (/) between two functions means the values are aliases.

acsc/acosec, asec, acot/acotan

Arcus cofunctions of sine, cosine, and tangent

acsch/acosech, asech, acoth/acotanh

Arcus cofunctions of hyperbolic sine, cosine, and tangent

asin, acos, atan

Arcus (inverse) functions of sine, cosine, and tangent

asinh, acosh, atanh

Arcus functions of hyperbolic sine, cosine, and tangent

atan2(y, x)

Principal value of arc tangent of y/x

csc/cosec, sec, cot/cotan

Cofunctions of sine, cosine, and tangent

csch/cosech, sech, coth/cotanh

Cofunctions of hyperbolic sine, cosine, and tangent

deg2rad

Degrees to radians

deg2grad

Degrees to gradians

grad2deg

Gradians to degrees

grad2rad

Gradians to radians

pi

The trigonometric constant pi

rad2deg

Radians to degrees

rad2grad

Radians to gradians

sinh, cosh, tanh

Hyperbolic sine, cosine, and tangent

tan

Tangent


Previous: 8.107 Math::ComplexPerl in a NutshellNext: 8.109 NDBM_File
8.107 Math::ComplexBook Index8.109 NDBM_File

Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.