math::trig - Trigonometric anf hyperbolic functions
The math::trig package defines a set of trigonomic and hyperbolic functions and their inverses. In addition it defines versions of the trigonomic functions that take arguments in degrees instead of radians.
For easy use these functions may be imported into the tcl::mathfunc namespace, so that they can be used directly in the expr command.
The functions radian_reduced and degree_reduced return a reduced angle, in respectively radians and degrees, in the intervals [0, 2pi) and [0, 360):
Return the equivalent angle in the interval [0, 2pi).
Angle (in radians)
Return the equivalent angle in the interval [0, 360).
Angle (in degrees)
The following trigonomic functions are defined in addition to the ones defined in the expr command:
Calculate the cosecant of the angle (1/cos(angle))
Angle (in radians)
Calculate the secant of the angle (1/sin(angle))
Angle (in radians)
Calculate the cotangent of the angle (1/tan(angle))
Angle (in radians)
For these functions also the inverses are defined:
Calculate the arc cosecant of the value
Value of the argument
Calculate the arc secant of the value
Value of the argument
Calculate the arc cotangent of the value
Value of the argument
The following hyperbolic and inverse hyperbolic functions are defined:
Calculate the hyperbolic cosecant of the value (1/sinh(value))
Value of the argument
Calculate the hyperbolic secant of the value (1/cosh(value))
Value of the argument
Calculate the hyperbolic cotangent of the value (1/tanh(value))
Value of the argument
Calculate the arc hyperbolic sine of the value
Value of the argument
Calculate the arc hyperbolic cosine of the value
Value of the argument
Calculate the arc hyperbolic tangent of the value
Value of the argument
Calculate the arc hyperbolic cosecant of the value
Value of the argument
Calculate the arc hyperbolic secant of the value
Value of the argument
Calculate the arc hyperbolic cotangent of the value
Value of the argument
The following versions of the common trigonometric functions and their inverses are defined:
Calculate the sine of the angle (in degrees)
Angle (in degrees)
Calculate the cosine of the angle (in degrees)
Angle (in radians)
Calculate the cotangent of the angle (in degrees)
Angle (in degrees)
Calculate the cosecant of the angle (in degrees)
Angle (in degrees)
Calculate the secant of the angle (in degrees)
Angle (in degrees)
Calculate the cotangent of the angle (in degrees)
Angle (in degrees)
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category math :: trig of the Tcllib Trackers. Please also report any ideas for enhancements you may have for either package and/or documentation.
When proposing code changes, please provide unified diffs, i.e the output of diff -u.
Note further that attachments are strongly preferred over inlined patches. Attachments can be made by going to the Edit form of the ticket immediately after its creation, and then using the left-most button in the secondary navigation bar.
Mathematics
Copyright © 2018 Arjen Markus