NAME
Math::Trig::Degree - Inverse and hyperbolic trigonemetric Functions
in degrees or radians
SYNOPSIS
use Math::Trig::Degree qw(dsin dcos tan sec csc cot asin acos atan asec acsc acot sinh cosh tanh sech csch coth asinh acosh atanh asech acsch acoth deg_to_rad rad_to_deg);
$v = dsin($x);
$v = dcos($x);
$v = tan($x);
$v = sec($x);
$v = csc($x);
$v = cot($x);
$v = asin($x);
$v = acos($x);
$v = atan($x);
$v = asec($x);
$v = acsc($x);
$v = acot($x);
$v = sinh($x);
$v = cosh($x);
$v = tanh($x);
$v = sech($x);
$v = csch($x);
$v = coth($x);
$v = asinh($x);
$v = acosh($x);
$v = atanh($x);
$v = asech($x);
$v = acsch($x);
$v = acoth($x);
$degrees = rad_to_deg($radians);
$radians = deg_to_rad($degrees);
# to use radians instead of degrees
$Math::Trig::Degree::RADIANS = 1;
DESCRIPTION
This module exports the missing inverse and hyperbolic trigonometric functions of real numbers. The inverse functions return values cooresponding to the principal values. Specifying an argument outside of the domain of the function where an illegal divion by zero would occur will cause infinity to be returned. Infinity is Perl's version of this.
This module implements the functions in degrees by default. If you want radians use Math::Trig or set the $RADIANS var:
$Math::Trig::Degree::RADIANS = 1;
A value of Pi to 30 decimal places is used in the source. This will be truncated by your version of Perl to the longest float supported.
To avoid redefining the internal sin() and cos() functions we use dsin() and dcos() for the degree based variants. You can use either if you set $RADIANS.
dsin
returns sin of real argument.
dcos
returns cos of real argument.
tan
returns tangent of real argument.
sec
returns secant of real argument.
csc
returns cosecant of real argument.
cot
returns cotangent of real argument.
asin
returns inverse sine of real argument.
acos
returns inverse cosine of real argument.
atan
returns inverse tangent of real argument.
asec
returns inverse secant of real argument.
acsc
returns inverse cosecant of real argument.
acot
returns inverse cotangent of real argument.
sinh
returns hyperbolic sine of real argument.
cosh
returns hyperbolic cosine of real argument.
tanh
returns hyperbolic tangent of real argument.
sech
returns hyperbolic secant of real argument.
csch
returns hyperbolic cosecant of real argument.
coth
returns hyperbolic cotangent of real argument.
asinh
returns inverse hyperbolic sine of real argument.
acosh
returns inverse hyperbolic cosine of real argument.
(positive value only)
atanh
returns inverse hyperbolic tangent of real argument.
asech
returns inverse hyperbolic secant of real argument.
(positive value only)
acsch
returns inverse hyperbolic cosecant of real argument.
acoth
returns inverse hyperbolic cotangent of real argument.
HISTORY
Modification of Math::Trig by request from stefan_k.
BUGS
Because of the limit on the accuracy of the vaule of Pi that is easily supported via a float you will get values like dsin(30) = 0.49999999999999945
Let me know about any others.
AUTHOR
Initial Version John A.R. Williams <J.A.R.Williams@aston.ac.uk> Bug fixes and many additonal functions Jason Smith <smithj4@rpi.edu> This version James Freeman <james.freeman@id3.org.uk>