Mercurial > hg > octave-lyh
changeset 15443:0b6c29cb53d0
Update trig function doc
author | Michael Godfrey <michaeldgodfrey@gmail.com> |
---|---|
date | Tue, 25 Sep 2012 21:53:44 -0400 |
parents | 015cc3d1f389 |
children | 46dd555edd33 |
files | doc/interpreter/arith.txi |
diffstat | 1 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/interpreter/arith.txi +++ b/doc/interpreter/arith.txi @@ -118,6 +118,20 @@ example, @code{sin} expects an angle in radians while @code{sind} expects an angle in degrees. +Octave uses the C library trigonometric functions. It is expected that these +functions are defined by the ISO/IEC 9899 standard. This Standard is available +at: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf. Section F.9.1 deals +with the trigonometric functions. The behavior of most of the functions is +relatively straightforward. However, there are some exceptions to the standard +behavior. Many of the exceptions involve the behavior for -0. +The most complex case is atan2. Octave exactly implements the behavior given +in the Standard. Including @tex $atan2(\pm0, -0)$ @end tex @ifnottex @code +{atan2(+- 0, 0)} @end ifnottex +returns @tex $\pm \pi.$@end tex @ifnottex @code{+- pi}. + +It should be noted that Matlab uses different definitions which apparently +do not distinguish -0. + @DOCSTRING(sin) @DOCSTRING(cos) @DOCSTRING(tan)