diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2021-02-03 11:19:49 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2021-02-03 11:19:49 +0000 |
commit | cd4a40e1f97dcde327dccb792a531cfe23c09415 (patch) | |
tree | d8a79c08fae03bf82843bf3d5c04cf8846c7415f /doc | |
parent | 9d58c3e54e5e7ef93bb627189de1b95e2f82edb2 (diff) | |
download | mpfr-cd4a40e1f97dcde327dccb792a531cfe23c09415.tar.gz |
[doc/mpfr.texi] document atan2u and atan2pi
git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14348 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'doc')
-rw-r--r-- | doc/mpfr.texi | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/doc/mpfr.texi b/doc/mpfr.texi index db17e1954..227ab85a4 100644 --- a/doc/mpfr.texi +++ b/doc/mpfr.texi @@ -2353,14 +2353,21 @@ divided by @m{\pi,Pi}. @end deftypefun @deftypefun int mpfr_atan2 (mpfr_t @var{rop}, mpfr_t @var{y}, mpfr_t @var{x}, mpfr_rnd_t @var{rnd}) -Set @var{rop} to the arc-tangent2 of @var{y} and @var{x}, -rounded in the direction @var{rnd}: +@deftypefunx int mpfr_atan2u (mpfr_t @var{rop}, mpfr_t @var{y}, mpfr_t @var{x}, unsigned long int @var{u}, mpfr_rnd_t @var{rnd}) +@deftypefunx int mpfr_atan2pi (mpfr_t @var{rop}, mpfr_t @var{y}, mpfr_t @var{x}, mpfr_rnd_t @var{rnd}) +For @code{mpfr_atan2}, set @var{rop} to the arc-tangent2 of @var{y} and +@var{x}, rounded in the direction @var{rnd}: if @code{x > 0}, @code{atan2(y, x) = atan(y/x)}; if @code{x < 0}, @code{atan2(y, x) = sign(y)*(Pi - atan(@GMPabs{y/x}))}, thus a number from @m{-\pi,-Pi} to @m{\pi,Pi}. As for @code{atan}, in case the exact mathematical result is @m{+\pi,+Pi} or @m{-\pi,-Pi}, its rounded result might be outside the function output range. +The function @code{mpfr_atan2u} behaves similarly, except the result is +multiplied by @var{u} and divided by 2@tie{}Pi; and @code{mpfr_atan2pi} +is the same as @code{mpfr_atan2u} with @code{u=2}. +For example, if @var{u} equals 360, @code{mpfr_atan2u} returns the +arc-tangent in degrees, with values from @minus{}180 to 180. @code{atan2(y, 0)} does not raise any floating-point exception. Special values are handled as described in the ISO C99 and IEEE@tie{}754-2008 @@ -4135,6 +4142,8 @@ that were added after MPFR@tie{}2.2, and in which MPFR version. @item @code{mpfr_atanpi} and @code{mpfr_atanu} in MPFR@tie{}4.2. +@item @code{mpfr_atan2pi} and @code{mpfr_atan2u} in MPFR@tie{}4.2. + @item @code{mpfr_beta} in MPFR@tie{}4.0 (incomplete, experimental). @item @code{mpfr_buildopt_decimal_p} in MPFR@tie{}3.0. |