diff options
author | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2004-09-29 08:59:58 +0000 |
---|---|---|
committer | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2004-09-29 08:59:58 +0000 |
commit | a974b05ee4a1583be2648d6cb0792bb0ee913221 (patch) | |
tree | 6b2f820c52dae90829bf1516e48fc577031cabe1 | |
parent | 4b50b26a53501b8675dc2a62acfd0b2dba6c04c4 (diff) | |
download | mpfr-a974b05ee4a1583be2648d6cb0792bb0ee913221.tar.gz |
Move mpfr_inits from mpfr-impl to mpfr.h.
Add doc too.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3004 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r-- | mpfr-impl.h | 4 | ||||
-rw-r--r-- | mpfr.h | 4 | ||||
-rw-r--r-- | mpfr.texi | 38 |
3 files changed, 42 insertions, 4 deletions
diff --git a/mpfr-impl.h b/mpfr-impl.h index 363de98e1..3576b7975 100644 --- a/mpfr-impl.h +++ b/mpfr-impl.h @@ -594,10 +594,6 @@ int strncasecmp _MPFR_PROTO ((const char *, const char *, size_t)); int mpfr_strncasecmp _MPFR_PROTO ((const char *, const char *, size_t)); #endif -void mpfr_inits2 _MPFR_PROTO ((mp_prec_t, mpfr_ptr, ...)); -void mpfr_inits _MPFR_PROTO ((mpfr_ptr, ...)); -void mpfr_clears _MPFR_PROTO ((mpfr_ptr, ...)); - int mpfr_set_underflow _MPFR_PROTO ((mpfr_ptr, mp_rnd_t, int)); int mpfr_set_overflow _MPFR_PROTO ((mpfr_ptr, mp_rnd_t, int)); void mpfr_save_emin_emax _MPFR_PROTO ((void)); @@ -193,6 +193,10 @@ void mpfr_init2 _MPFR_PROTO ((mpfr_ptr, mpfr_prec_t)); void mpfr_init _MPFR_PROTO ((mpfr_ptr)); void mpfr_clear _MPFR_PROTO ((mpfr_ptr)); +void mpfr_inits2 _MPFR_PROTO ((mp_prec_t, mpfr_ptr, ...)); +void mpfr_inits _MPFR_PROTO ((mpfr_ptr, ...)); +void mpfr_clears _MPFR_PROTO ((mpfr_ptr, ...)); + int mpfr_prec_round _MPFR_PROTO ((mpfr_ptr, mpfr_prec_t, mpfr_rnd_t)); int mpfr_can_round _MPFR_PROTO ((mpfr_ptr, mp_exp_t, mpfr_rnd_t, mpfr_rnd_t, mpfr_prec_t)); @@ -1616,6 +1616,8 @@ which is non-zero iff the flag is set. @section Advanced Functions @cindex Advanced Functions +All the given interface are preliminary. It might change incompatibly in future revisions. + @defmac MPFR_DECL_INIT (@var{name}, @var{prec}) This macro declares @var{name} as an automatic variable of type @code{mpfr_t}, initializes it and sets its precision to be @strong{exactly} @var{prec} bits @@ -1637,6 +1639,42 @@ must support @samp{Variable-length automatic arrays} (standard in ISO C99). @end itemize @end defmac +@deftypefun void mpfr_inits (mpfr_t @var{x}, ...) +Initialize all the @code{mpfr_t} variables of the given @code{va_list}, +set their precision to be the default precision and their value to NaN. +See @code{mpfr_init} for more details. +The @code{va_list} is assumed to be composed only of type @code{mpfr_t}. +It begins from @var{x}. It ends when it encounters a @code{NULL} pointer. +@end deftypefun + + +@deftypefun void mpfr_inits2 (mp_prec_t @var{prec}, mpfr_t @var{x}, ...) +Initialize all the @code{mpfr_t} variables of the given @code{va_list}, +set their precision to be @strong{exactly} +@var{prec} bits and their value to NaN. +See @code{mpfr_init2} for more details. +The @code{va_list} is assumed to be composed only of type @code{mpfr_t}. +It begins from @var{x}. It ends when it encounters a @code{NULL} pointer. +@end deftypefun + +@deftypefun void mpfr_clears (mpfr_t @var{x}, ...) +Free the space occupied by all the @code{mpfr_t} variables of the given +@code{va_list}. See @code{mpfr_clear} for more details. +The @code{va_list} is assumed to be composed only of type @code{mpfr_t}. +It begins from @var{x}. It ends when it encounters a @code{NULL} pointer. +@end deftypefun + +Here is an example of how to use multiple initialization functions: + +@example +@{ + mpfr_t x, y, z, t; + mpfr_inits2 (256, x, y, z, t, NULL); + @dots{} + mpfr_clears (x, y, z, t, NULL); +@} +@end example + @node Compatibility with MPF, Internals, Advanced Functions, MPFR Interface @section Compatibility with MPF |