Mercurial > hg > octave-lyh
comparison doc/interpreter/arith.txi @ 15443:0b6c29cb53d0
Update trig function doc
author | Michael Godfrey <michaeldgodfrey@gmail.com> |
---|---|
date | Tue, 25 Sep 2012 21:53:44 -0400 |
parents | 5984aa619cd9 |
children | 46dd555edd33 |
comparison
equal
deleted
inserted
replaced
15442:015cc3d1f389 | 15443:0b6c29cb53d0 |
---|---|
116 which work directly on an argument specified in degrees. These functions | 116 which work directly on an argument specified in degrees. These functions |
117 are named after the base trigonometric function with a @samp{d} suffix. For | 117 are named after the base trigonometric function with a @samp{d} suffix. For |
118 example, @code{sin} expects an angle in radians while @code{sind} expects an | 118 example, @code{sin} expects an angle in radians while @code{sind} expects an |
119 angle in degrees. | 119 angle in degrees. |
120 | 120 |
121 Octave uses the C library trigonometric functions. It is expected that these | |
122 functions are defined by the ISO/IEC 9899 standard. This Standard is available | |
123 at: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf. Section F.9.1 deals | |
124 with the trigonometric functions. The behavior of most of the functions is | |
125 relatively straightforward. However, there are some exceptions to the standard | |
126 behavior. Many of the exceptions involve the behavior for -0. | |
127 The most complex case is atan2. Octave exactly implements the behavior given | |
128 in the Standard. Including @tex $atan2(\pm0, -0)$ @end tex @ifnottex @code | |
129 {atan2(+- 0, 0)} @end ifnottex | |
130 returns @tex $\pm \pi.$@end tex @ifnottex @code{+- pi}. | |
131 | |
132 It should be noted that Matlab uses different definitions which apparently | |
133 do not distinguish -0. | |
134 | |
121 @DOCSTRING(sin) | 135 @DOCSTRING(sin) |
122 @DOCSTRING(cos) | 136 @DOCSTRING(cos) |
123 @DOCSTRING(tan) | 137 @DOCSTRING(tan) |
124 @DOCSTRING(sec) | 138 @DOCSTRING(sec) |
125 @DOCSTRING(csc) | 139 @DOCSTRING(csc) |