1math::trig(n)                  Tcl Math Library                  math::trig(n)
2
3
4
5______________________________________________________________________________
6

NAME

8       math::trig - Trigonometric anf hyperbolic functions
9

SYNOPSIS

11       package require Tcl  8.5
12
13       package require math::trig  1.0.0
14
15       ::math::trig::radian_reduced angle
16
17       ::math::trig::degree_reduced angle
18
19       ::math::trig::cosec angle
20
21       ::math::trig::sec angle
22
23       ::math::trig::cotan angle
24
25       ::math::trig::acosec value
26
27       ::math::trig::asec value
28
29       ::math::trig::acotan value
30
31       ::math::trig::cosech value
32
33       ::math::trig::sech value
34
35       ::math::trig::cotanh value
36
37       ::math::trig::asinh value
38
39       ::math::trig::acosh value
40
41       ::math::trig::atanh value
42
43       ::math::trig::acosech value
44
45       ::math::trig::asech value
46
47       ::math::trig::acotanh value
48
49       ::math::trig::sind angle
50
51       ::math::trig::cosd angle
52
53       ::math::trig::tand angle
54
55       ::math::trig::cosecd angle
56
57       ::math::trig::secd angle
58
59       ::math::trig::cotand angle
60
61______________________________________________________________________________
62

DESCRIPTION

64       The math::trig package defines a set of trigonomic and hyperbolic func‐
65       tions and their inverses. In addition it defines versions of the trigo‐
66       nomic functions that take arguments in degrees instead of radians.
67
68       For  easy  use  these  functions may be imported into the tcl::mathfunc
69       namespace, so that they can be used directly in the expr command.
70

FUNCTIONS

72       The functions radian_reduced and degree_reduced return a reduced angle,
73       in  respectively radians and degrees, in the intervals [0, 2pi) and [0,
74       360):
75
76       ::math::trig::radian_reduced angle
77              Return the equivalent angle in the interval [0, 2pi).
78
79              float angle
80                     Angle (in radians)
81
82       ::math::trig::degree_reduced angle
83              Return the equivalent angle in the interval [0, 360).
84
85              float angle
86                     Angle (in degrees)
87
88       The following trigonomic functions are defined in addition to the  ones
89       defined in the expr command:
90
91       ::math::trig::cosec angle
92              Calculate the cosecant of the angle (1/cos(angle))
93
94              float angle
95                     Angle (in radians)
96
97       ::math::trig::sec angle
98              Calculate the secant of the angle (1/sin(angle))
99
100              float angle
101                     Angle (in radians)
102
103       ::math::trig::cotan angle
104              Calculate the cotangent of the angle (1/tan(angle))
105
106              float angle
107                     Angle (in radians)
108
109       For these functions also the inverses are defined:
110
111       ::math::trig::acosec value
112              Calculate the arc cosecant of the value
113
114              float value
115                     Value of the argument
116
117       ::math::trig::asec value
118              Calculate the arc secant of the value
119
120              float value
121                     Value of the argument
122
123       ::math::trig::acotan value
124              Calculate the arc cotangent of the value
125
126              float value
127                     Value of the argument
128
129       The following hyperbolic and inverse hyperbolic functions are defined:
130
131       ::math::trig::cosech value
132              Calculate the hyperbolic cosecant of the value (1/sinh(value))
133
134              float value
135                     Value of the argument
136
137       ::math::trig::sech value
138              Calculate the hyperbolic secant of the value (1/cosh(value))
139
140              float value
141                     Value of the argument
142
143       ::math::trig::cotanh value
144              Calculate the hyperbolic cotangent of the value (1/tanh(value))
145
146              float value
147                     Value of the argument
148
149       ::math::trig::asinh value
150              Calculate the arc hyperbolic sine of the value
151
152              float value
153                     Value of the argument
154
155       ::math::trig::acosh value
156              Calculate the arc hyperbolic cosine of the value
157
158              float value
159                     Value of the argument
160
161       ::math::trig::atanh value
162              Calculate the arc hyperbolic tangent of the value
163
164              float value
165                     Value of the argument
166
167       ::math::trig::acosech value
168              Calculate the arc hyperbolic cosecant of the value
169
170              float value
171                     Value of the argument
172
173       ::math::trig::asech value
174              Calculate the arc hyperbolic secant of the value
175
176              float value
177                     Value of the argument
178
179       ::math::trig::acotanh value
180              Calculate the arc hyperbolic cotangent of the value
181
182              float value
183                     Value of the argument
184
185       The  following versions of the common trigonometric functions and their
186       inverses are defined:
187
188       ::math::trig::sind angle
189              Calculate the sine of the angle (in degrees)
190
191              float angle
192                     Angle (in degrees)
193
194       ::math::trig::cosd angle
195              Calculate the cosine of the angle (in degrees)
196
197              float angle
198                     Angle (in radians)
199
200       ::math::trig::tand angle
201              Calculate the cotangent of the angle (in degrees)
202
203              float angle
204                     Angle (in degrees)
205
206       ::math::trig::cosecd angle
207              Calculate the cosecant of the angle (in degrees)
208
209              float angle
210                     Angle (in degrees)
211
212       ::math::trig::secd angle
213              Calculate the secant of the angle (in degrees)
214
215              float angle
216                     Angle (in degrees)
217
218       ::math::trig::cotand angle
219              Calculate the cotangent of the angle (in degrees)
220
221              float angle
222                     Angle (in degrees)
223

BUGS, IDEAS, FEEDBACK

225       This document, and the package it describes, will  undoubtedly  contain
226       bugs  and  other  problems.  Please report such in the category math ::
227       trig of  the  Tcllib  Trackers  [http://core.tcl.tk/tcllib/reportlist].
228       Please  also  report any ideas for enhancements you may have for either
229       package and/or documentation.
230
231       When proposing code changes, please provide unified diffs, i.e the out‐
232       put of diff -u.
233
234       Note  further  that  attachments  are  strongly  preferred over inlined
235       patches. Attachments can be made by going  to  the  Edit  form  of  the
236       ticket  immediately  after  its  creation, and then using the left-most
237       button in the secondary navigation bar.
238

KEYWORDS

240       math, trigonometry
241

CATEGORY

243       Mathematics
244
246       Copyright (c) 2018 Arjen Markus
247
248
249
250
251tcllib                               1.0.0                       math::trig(n)
Impressum