math::trig - Trigonometric anf hyperbolic functions
Contents
Bugs, Ideas, Feedback
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please
report such in the category math::trig of the TcllibTrackers [http://core.tcl.tk/tcllib/reportlist].
Please also report any ideas for enhancements you may have for either package and/or documentation.
When proposing code changes, please provide unifieddiffs, 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.
Category
Mathematics
Copyright
Copyright (c) 2018 Arjen Markus
tcllib 1.1 math::trig(3tcl)
Description
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.
Functions
The functions radian_reduced and degree_reduced return a reduced angle, in respectively radians and
degrees, in the intervals [0, 2pi) and [0, 360):
::math::trig::radian_reducedangle
Return the equivalent angle in the interval [0, 2pi).
float angle
Angle (in radians)
::math::trig::degree_reducedangle
Return the equivalent angle in the interval [0, 360).
float angle
Angle (in degrees)
The following trigonomic functions are defined in addition to the ones defined in the expr command:
::math::trig::cosecangle
Calculate the cosecant of the angle (1/cos(angle))
float angle
Angle (in radians)
::math::trig::secangle
Calculate the secant of the angle (1/sin(angle))
float angle
Angle (in radians)
::math::trig::cotanangle
Calculate the cotangent of the angle (1/tan(angle))
float angle
Angle (in radians)
For these functions also the inverses are defined:
::math::trig::acosecvalue
Calculate the arc cosecant of the value
float value
Value of the argument
::math::trig::asecvalue
Calculate the arc secant of the value
float value
Value of the argument
::math::trig::acotanvalue
Calculate the arc cotangent of the value
float value
Value of the argument
The following hyperbolic and inverse hyperbolic functions are defined:
::math::trig::cosechvalue
Calculate the hyperbolic cosecant of the value (1/sinh(value))
float value
Value of the argument
::math::trig::sechvalue
Calculate the hyperbolic secant of the value (1/cosh(value))
float value
Value of the argument
::math::trig::cotanhvalue
Calculate the hyperbolic cotangent of the value (1/tanh(value))
float value
Value of the argument
::math::trig::asinhvalue
Calculate the arc hyperbolic sine of the value
float value
Value of the argument
::math::trig::acoshvalue
Calculate the arc hyperbolic cosine of the value
float value
Value of the argument
::math::trig::atanhvalue
Calculate the arc hyperbolic tangent of the value
float value
Value of the argument
::math::trig::acosechvalue
Calculate the arc hyperbolic cosecant of the value
float value
Value of the argument
::math::trig::asechvalue
Calculate the arc hyperbolic secant of the value
float value
Value of the argument
::math::trig::acotanhvalue
Calculate the arc hyperbolic cotangent of the value
float value
Value of the argument
The following versions of the common trigonometric functions and their inverses are defined:
::math::trig::sindangle
Calculate the sine of the angle (in degrees)
float angle
Angle (in degrees)
::math::trig::cosdangle
Calculate the cosine of the angle (in degrees)
float angle
Angle (in radians)
::math::trig::tandangle
Calculate the cotangent of the angle (in degrees)
float angle
Angle (in degrees)
::math::trig::cosecdangle
Calculate the cosecant of the angle (in degrees)
float angle
Angle (in degrees)
::math::trig::secdangle
Calculate the secant of the angle (in degrees)
float angle
Angle (in degrees)
::math::trig::cotandangle
Calculate the cotangent of the angle (in degrees)
float angle
Angle (in degrees)
Keywords
math, trigonometry
Name
math::trig - Trigonometric anf hyperbolic functions
Synopsis
package require Tcl8.59
package require math::trig1.1::math::trig::radian_reducedangle::math::trig::degree_reducedangle::math::trig::cosecangle::math::trig::secangle::math::trig::cotanangle::math::trig::acosecvalue::math::trig::asecvalue::math::trig::acotanvalue::math::trig::cosechvalue::math::trig::sechvalue::math::trig::cotanhvalue::math::trig::asinhvalue::math::trig::acoshvalue::math::trig::atanhvalue::math::trig::acosechvalue::math::trig::asechvalue::math::trig::acotanhvalue::math::trig::sindangle::math::trig::cosdangle::math::trig::tandangle::math::trig::cosecdangle::math::trig::secdangle::math::trig::cotandangle
________________________________________________________________________________________________________________
