summaryrefslogtreecommitdiff
path: root/mpfr.texi
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2003-09-11 16:49:11 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2003-09-11 16:49:11 +0000
commit1c24e6a15a2eddc5145422d5b6321ee14eac288e (patch)
tree4191f7113b3bd472100f16dc847ae51e3cd5c790 /mpfr.texi
parent101429a324956af3411efa6209af9597a3d7f4f1 (diff)
downloadmpfr-1c24e6a15a2eddc5145422d5b6321ee14eac288e.tar.gz
New functions mpfr_inits, mpfr_inits2 and mpfr_clears to initialize or
free several floating-point numbers (written by Patrick PĂ©lissier). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2409 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'mpfr.texi')
-rw-r--r--mpfr.texi23
1 files changed, 19 insertions, 4 deletions
diff --git a/mpfr.texi b/mpfr.texi
index 331ad1780..70081c63e 100644
--- a/mpfr.texi
+++ b/mpfr.texi
@@ -729,6 +729,22 @@ Free the space occupied by @var{x}. Make sure to call this function for all
@code{mpfr_t} variables when you are done with them.
@end deftypefun
+@deftypefun void mpfr_inits (mpfr_t @var{x}, ...)
+Initialize the given floating-point numbers with @code{mpfr_init}.
+The list of arguments must be terminated by a null pointer.
+@end deftypefun
+
+@deftypefun void mpfr_inits2 (mp_prec_t @var{prec}, mpfr_t @var{x}, ...)
+Initialize the given floating-point numbers and set their precision to
+be @strong{exactly} @var{prec} bits with @code{mpfr_init2}. The list of
+arguments must be terminated by a null pointer.
+@end deftypefun
+
+@deftypefun void mpfr_clears (mpfr_t @var{x}, ...)
+Free the space occupied by the given floating-point numbers with
+@code{mpfr_clear}.
+@end deftypefun
+
@need 2000
Here is an example on how to initialize floating-point variables:
@@ -739,8 +755,7 @@ Here is an example on how to initialize floating-point variables:
mpfr_init2 (y, 256); /* precision @emph{exactly} 256 bits */
@dots{}
/* Unless the program is about to exit, do ... */
- mpfr_clear (x);
- mpfr_clear (y);
+ mpfr_clears (x, y, (void *) 0);
@}
@end example
@@ -1559,12 +1574,12 @@ E(b)-@var{err} where E(b) is the exponent of
This function @strong{does not modify} its arguments.
@end deftypefun
-@deftypefun mp_exp_t mpfr_get_exp (mpfr_srcptr @var{x})
+@deftypefun mp_exp_t mpfr_get_exp (mpfr_t @var{x})
Get the exponent of @var{x}, assuming that @var{x} is a non-zero real
number.
@end deftypefun
-@deftypefun int mpfr_set_exp (mpfr_ptr @var{x}, mp_exp_t @var{e})
+@deftypefun int mpfr_set_exp (mpfr_t @var{x}, mp_exp_t @var{e})
Set the exponent of @var{x} if @var{e} is in the current exponent range,
and return 0; otherwise, return 1. If @var{x} is not a real number or is
equal to zero, nothing visible happens.