diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2018-09-07 08:45:54 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2018-09-07 08:45:54 +0000 |
commit | 7d0cf89a18b057d3bad20b06c1422ed32962f267 (patch) | |
tree | 4e04ec7098ee568aa6535b939f94a05bc198545e /doc | |
parent | 6c590b2f7baba681d7abc49f454bd7af03f51906 (diff) | |
download | mpfr-7d0cf89a18b057d3bad20b06c1422ed32962f267.tar.gz |
[doc/mpfr.texi] mpfr_rootn_ui, mpfr_root: changed k to n in order to
match IEEE 754-2008. Also improved the description of mpfr_rootn_ui,
mentioning the P754/D2.41 draft of the next IEEE 754 standard because
IEEE 754-2008 is incomplete.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13152 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'doc')
-rw-r--r-- | doc/mpfr.texi | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/doc/mpfr.texi b/doc/mpfr.texi index 6b8d104a8..ecce47324 100644 --- a/doc/mpfr.texi +++ b/doc/mpfr.texi @@ -1855,23 +1855,25 @@ is @minus{}Inf instead of +Inf. @end deftypefun @deftypefun int mpfr_cbrt (mpfr_t @var{rop}, mpfr_t @var{op}, mpfr_rnd_t @var{rnd}) -@deftypefunx int mpfr_rootn_ui (mpfr_t @var{rop}, mpfr_t @var{op}, unsigned long int @var{k}, mpfr_rnd_t @var{rnd}) -Set @var{rop} to the cubic root (resp.@: the @var{k}th root) -of @var{op} rounded in the direction @var{rnd}. -For @var{k} = 0, set @var{rop} to NaN@. -For @var{k} odd (resp.@: even) and @var{op} negative (including @minus{}Inf), +@deftypefunx int mpfr_rootn_ui (mpfr_t @var{rop}, mpfr_t @var{op}, unsigned long int @var{n}, mpfr_rnd_t @var{rnd}) +Set @var{rop} to the @var{n}th root (with @math{@var{n} = 3}, the cubic root, +for @code{mpfr_cbrt}) of @var{op} rounded in the direction @var{rnd}. +For @math{@var{n} = 0}, set @var{rop} to NaN@. +For @var{n} odd (resp.@: even) and @var{op} negative (including @minus{}Inf), set @var{rop} to a negative number (resp.@: NaN)@. If @var{op} is zero, set @var{rop} to zero with the sign obtained by the -usual limit rules, i.e., the same sign as @var{op} if @var{k} is odd, and -positive if @var{k} is even. +usual limit rules, i.e., the same sign as @var{op} if @var{n} is odd, and +positive if @var{n} is even. These functions agree with the rootn function of the IEEE 754-2008 standard -(Section 9.2). +and the P754/D2.41 draft of the next standard (Section 9.2). Note that it +is here restricted to @math{@var{n} @ge{} 0}. Functions allowing a negative +@var{n} may be implemented in the future. @end deftypefun -@deftypefun int mpfr_root (mpfr_t @var{rop}, mpfr_t @var{op}, unsigned long int @var{k}, mpfr_rnd_t @var{rnd}) +@deftypefun int mpfr_root (mpfr_t @var{rop}, mpfr_t @var{op}, unsigned long int @var{n}, mpfr_rnd_t @var{rnd}) This function is the same as @code{mpfr_rootn_ui} except when @var{op} -is @minus{}0 and @var{k} is even: the result is @minus{}0 instead of +0 +is @minus{}0 and @var{n} is even: the result is @minus{}0 instead of +0 (the reason was to be consistent with @code{mpfr_sqrt}). Said otherwise, if @var{op} is zero, set @var{rop} to @var{op}. |