diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2002-10-17 12:56:49 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2002-10-17 12:56:49 +0000 |
commit | aaa26e509507386d8ce54b241b8bea657f92eea9 (patch) | |
tree | cedb2088a43f6274584463132532f1b310d0b2d1 /mpfr.texi | |
parent | c49d9039611721a1c06ffa6873c47d20c56f0291 (diff) | |
download | mpfr-aaa26e509507386d8ce54b241b8bea657f92eea9.tar.gz |
added mpfr_set_ld and mpfr_get_ld
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2050 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'mpfr.texi')
-rw-r--r-- | mpfr.texi | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -756,6 +756,7 @@ These functions assign new values to already initialized floats @deftypefunx int mpfr_set_ui (mpfr_t @var{rop}, unsigned long int @var{op}, mp_rnd_t @var{rnd}) @deftypefunx int mpfr_set_si (mpfr_t @var{rop}, long int @var{op}, mp_rnd_t @var{rnd}) @deftypefunx int mpfr_set_d (mpfr_t @var{rop}, double @var{op}, mp_rnd_t @var{rnd}) +@deftypefunx int mpfr_set_ld (mpfr_t @var{rop}, long double @var{op}, mp_rnd_t @var{rnd}) @deftypefunx int mpfr_set_z (mpfr_t @var{rop}, mpz_t @var{op}, mp_rnd_t @var{rnd}) @deftypefunx int mpfr_set_q (mpfr_t @var{rop}, mpq_t @var{op}, mp_rnd_t @var{rnd}) Set the value of @var{rop} from @var{op}, rounded to the precision of @var{rop} @@ -770,6 +771,10 @@ may not be exactly representable as a double-precision number (this happens for 0.1 for instance), in which case it is first rounded by the C compiler to a double-precision number, and then only to a @code{mpfr} floating-point number. + +Please note that the C9X standard does not specify exactly the mantissa +width of the long double type; the @code{mpfr_set_ld} function assumes +it has at most 113 bits, and an exponent of at most 15 bits. @end deftypefun @deftypefun int mpfr_set_str (mpfr_t @var{x}, char *@var{s}, int @var{base}, mp_rnd_t @var{rnd}) @@ -852,7 +857,12 @@ See @code{mpfr_set_str}. @cindex Conversion functions @deftypefun double mpfr_get_d (mpfr_t @var{op}, mp_rnd_t @var{rnd}) -Convert @var{op} to a double, using the rounding mode @var{rnd}. +@deftypefunx {long double} mpfr_get_ld (mpfr_t @var{op}, mp_rnd_t @var{rnd}) +Convert @var{op} to a double (respectively long double), +using the rounding mode @var{rnd}. +Please note that the C9X standard does not specify exactly the mantissa +width of the long double type; the @code{mpfr_get_ld} function assumes +it has at most 113 bits, and an exponent of at most 15 bits. @end deftypefun @deftypefun double mpfr_get_d1 (mpfr_t @var{op}) |