summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.in42
-rw-r--r--TODO12
-rw-r--r--add_ui.c8
-rw-r--r--asin.c7
-rw-r--r--asinh.c7
-rw-r--r--atanh.c7
-rw-r--r--clear.c5
-rw-r--r--copysign.c8
-rw-r--r--cos.c13
-rw-r--r--cosh.c7
-rw-r--r--dim.c8
-rw-r--r--exp.c7
-rw-r--r--exp2.c7
-rw-r--r--expm1.c7
-rw-r--r--extract.c9
-rw-r--r--factorial.c9
-rw-r--r--fma.c11
-rw-r--r--gmp_op.c66
-rw-r--r--hypot.c10
-rw-r--r--isinteger.c14
-rw-r--r--log1p.c9
-rw-r--r--log2.c10
-rw-r--r--log_base_10.c9
-rw-r--r--log_base_2.c9
-rw-r--r--minmax.c18
-rw-r--r--mul.c16
-rw-r--r--pow.c10
-rw-r--r--pow_si.c10
-rw-r--r--print_raw.c9
-rw-r--r--rnd_mode.c9
-rw-r--r--set_rnd.c7
-rw-r--r--set_str_raw.c8
-rw-r--r--sin.c9
-rw-r--r--sinh.c9
-rw-r--r--sqrt.c10
-rw-r--r--sqrt_ui.c9
-rw-r--r--tan.c9
-rw-r--r--tanh.c9
-rw-r--r--tests/Makefile.in4
-rw-r--r--ui_pow.c10
40 files changed, 51 insertions, 406 deletions
diff --git a/Makefile.in b/Makefile.in
index cfbafa072..07e6f87ab 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -69,13 +69,13 @@ RANLIB = @RANLIB@
VERSION = @VERSION@
SUBDIRS = tests
-EXTRA_DIST = generic.c
+EXTRA_DIST = generic.c COPYING.LIB
include_HEADERS = mpfr.h mpf2mpfr.h mpfr-test.h
lib_LIBRARIES = libmpfr.a
-libmpfr_a_SOURCES = cputime.h mpfr.h mpfr-impl.h exceptions.c save_expo.c extract.c add.c add1.c add_ui.c add_ulp.c agm.c clear.c cmp.c cmp_abs.c cmp_ui.c div_2exp.c div.c div_ui.c dump.c eq.c exp2.c exp3.c exp.c get_str.c init.c inp_str.c isinteger.c isnan.c log2.c log.c mul_2exp.c mul.c mul_ui.c neg.c out_str.c pi.c pow.c pow_si.c pow_ui.c print_raw.c print_rnd_mode.c random2.c random.c reldiff.c rnd_mode.c round.c set.c set_d.c set_dfl_prec.c set_rnd.c set_f.c set_prc_raw.c set_prec.c set_q.c set_si.c set_str.c set_str_raw.c set_ui.c set_z.c sqrt.c sqrt_ui.c sub.c sub1.c sub_ui.c trunc.c ui_div.c ui_sub.c urandomb.c sqrtrem.c mpz_set_fr.c swap.c factorial.c cosh.c sinh.c tanh.c acosh.c asinh.c atanh.c atan.c cmp2.c exp_2.c asin.c euler.c cos.c sin.c tan.c fma.c hypot.c log1p.c expm1.c log_base_2.c ui_pow.c ui_pow_ui.c log_base_10.c minmax.c dim.c copysign.c gmp_op.c
+libmpfr_a_SOURCES = cputime.h mpfr.h mpfr-impl.h exceptions.c save_expo.c extract.c add.c add1.c add_ui.c add_ulp.c agm.c clear.c cmp.c cmp_abs.c cmp_ui.c div_2exp.c div.c div_ui.c dump.c eq.c exp2.c exp3.c exp.c get_str.c init.c inp_str.c isinteger.c isinf.c isnan.c isnum.c log2.c log.c mul_2exp.c mul.c mul_ui.c neg.c out_str.c pi.c pow.c pow_si.c pow_ui.c print_raw.c print_rnd_mode.c random2.c random.c reldiff.c rnd_mode.c round.c set.c set_d.c set_dfl_prec.c set_rnd.c set_f.c set_prc_raw.c set_prec.c set_q.c set_si.c set_str.c set_str_raw.c set_ui.c set_z.c sqrt.c sqrt_ui.c sub.c sub1.c sub_ui.c trunc.c ui_div.c ui_sub.c urandomb.c sqrtrem.c mpz_set_fr.c swap.c factorial.c cosh.c sinh.c tanh.c acosh.c asinh.c atanh.c atan.c cmp2.c exp_2.c asin.c euler.c cos.c sin.c tan.c fma.c hypot.c log1p.c expm1.c log_base_2.c ui_pow.c ui_pow_ui.c log_base_10.c minmax.c dim.c copysign.c gmp_op.c
libmpfr_a_LIBADD = ceil.o floor.o
@@ -95,8 +95,8 @@ libmpfr_a_DEPENDENCIES = ceil.o floor.o
libmpfr_a_OBJECTS = exceptions.o save_expo.o extract.o add.o add1.o \
add_ui.o add_ulp.o agm.o clear.o cmp.o cmp_abs.o cmp_ui.o div_2exp.o \
div.o div_ui.o dump.o eq.o exp2.o exp3.o exp.o get_str.o init.o \
-inp_str.o isinteger.o isnan.o log2.o log.o mul_2exp.o mul.o mul_ui.o \
-neg.o out_str.o pi.o pow.o pow_si.o pow_ui.o print_raw.o \
+inp_str.o isinteger.o isinf.o isnan.o isnum.o log2.o log.o mul_2exp.o \
+mul.o mul_ui.o neg.o out_str.o pi.o pow.o pow_si.o pow_ui.o print_raw.o \
print_rnd_mode.o random2.o random.o reldiff.o rnd_mode.o round.o set.o \
set_d.o set_dfl_prec.o set_rnd.o set_f.o set_prc_raw.o set_prec.o \
set_q.o set_si.o set_str.o set_str_raw.o set_ui.o set_z.o sqrt.o \
@@ -115,9 +115,9 @@ DVIS = mpfr.dvi
TEXINFOS = mpfr.texi
HEADERS = $(include_HEADERS)
-DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
-Makefile.in NEWS TODO acinclude.m4 aclocal.m4 configure configure.in \
-install-sh missing mkinstalldirs texinfo.tex
+DIST_COMMON = README AUTHORS COPYING COPYING.LIB ChangeLog INSTALL \
+Makefile.am Makefile.in NEWS TODO acinclude.m4 aclocal.m4 configure \
+configure.in install-sh missing mkinstalldirs texinfo.tex
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
@@ -132,20 +132,20 @@ DEP_FILES = .deps/acosh.P .deps/add.P .deps/add1.P .deps/add_ui.P \
.deps/euler.P .deps/exceptions.P .deps/exp.P .deps/exp2.P .deps/exp3.P \
.deps/exp_2.P .deps/expm1.P .deps/extract.P .deps/factorial.P \
.deps/fma.P .deps/get_str.P .deps/gmp_op.P .deps/hypot.P .deps/init.P \
-.deps/inp_str.P .deps/isinteger.P .deps/isnan.P .deps/log.P \
-.deps/log1p.P .deps/log2.P .deps/log_base_10.P .deps/log_base_2.P \
-.deps/minmax.P .deps/mpz_set_fr.P .deps/mul.P .deps/mul_2exp.P \
-.deps/mul_ui.P .deps/neg.P .deps/out_str.P .deps/pi.P .deps/pow.P \
-.deps/pow_si.P .deps/pow_ui.P .deps/print_raw.P .deps/print_rnd_mode.P \
-.deps/random.P .deps/random2.P .deps/reldiff.P .deps/rnd_mode.P \
-.deps/round.P .deps/save_expo.P .deps/set.P .deps/set_d.P \
-.deps/set_dfl_prec.P .deps/set_f.P .deps/set_prc_raw.P .deps/set_prec.P \
-.deps/set_q.P .deps/set_rnd.P .deps/set_si.P .deps/set_str.P \
-.deps/set_str_raw.P .deps/set_ui.P .deps/set_z.P .deps/sin.P \
-.deps/sinh.P .deps/sqrt.P .deps/sqrt_ui.P .deps/sqrtrem.P .deps/sub.P \
-.deps/sub1.P .deps/sub_ui.P .deps/swap.P .deps/tan.P .deps/tanh.P \
-.deps/trunc.P .deps/ui_div.P .deps/ui_pow.P .deps/ui_pow_ui.P \
-.deps/ui_sub.P .deps/urandomb.P
+.deps/inp_str.P .deps/isinf.P .deps/isinteger.P .deps/isnan.P \
+.deps/isnum.P .deps/log.P .deps/log1p.P .deps/log2.P \
+.deps/log_base_10.P .deps/log_base_2.P .deps/minmax.P \
+.deps/mpz_set_fr.P .deps/mul.P .deps/mul_2exp.P .deps/mul_ui.P \
+.deps/neg.P .deps/out_str.P .deps/pi.P .deps/pow.P .deps/pow_si.P \
+.deps/pow_ui.P .deps/print_raw.P .deps/print_rnd_mode.P .deps/random.P \
+.deps/random2.P .deps/reldiff.P .deps/rnd_mode.P .deps/round.P \
+.deps/save_expo.P .deps/set.P .deps/set_d.P .deps/set_dfl_prec.P \
+.deps/set_f.P .deps/set_prc_raw.P .deps/set_prec.P .deps/set_q.P \
+.deps/set_rnd.P .deps/set_si.P .deps/set_str.P .deps/set_str_raw.P \
+.deps/set_ui.P .deps/set_z.P .deps/sin.P .deps/sinh.P .deps/sqrt.P \
+.deps/sqrt_ui.P .deps/sqrtrem.P .deps/sub.P .deps/sub1.P .deps/sub_ui.P \
+.deps/swap.P .deps/tan.P .deps/tanh.P .deps/trunc.P .deps/ui_div.P \
+.deps/ui_pow.P .deps/ui_pow_ui.P .deps/ui_sub.P .deps/urandomb.P
SOURCES = $(libmpfr_a_SOURCES)
OBJECTS = $(libmpfr_a_OBJECTS)
diff --git a/TODO b/TODO
index 167ed22c2..86b441190 100644
--- a/TODO
+++ b/TODO
@@ -1,5 +1,6 @@
Documentation:
+- update AUTHORS
- add a description of the algorithms used + proof of correctness
Installation:
@@ -12,21 +13,10 @@ Installation:
New functions to implement:
-- mpfr_mul_mpz, mpfr_div_mpz
-
-- fused multiply-add (suggestion from Dan Zuras)
-
Rounding:
-- implement exact rounding in mpfr_pow_ui and mpfr_ui_pow_ui
-
-- in all functions that do rounding, return an int indicating if the result
- is exact (i.e. no bit was lost) or not (like in mpfr_div_ui)
-
Efficiency:
-- mpfr_div is currently O(n^2) when the divisor has two limbs
-
Miscellaneous:
- change Library GPL to Lesser GPL, and mention INRIA and/or SPACES
diff --git a/add_ui.c b/add_ui.c
index c576bf0ba..eb1dfdcbf 100644
--- a/add_ui.c
+++ b/add_ui.c
@@ -27,15 +27,7 @@ MA 02111-1307, USA. */
#include "mpfr-impl.h"
int
-#if __STDC__
mpfr_add_ui (mpfr_ptr y, mpfr_srcptr x, unsigned long int u, mp_rnd_t rnd_mode)
-#else
-mpfr_add_ui (y, x, u, rnd_mode)
- mpfr_ptr y;
- mpfr_srcptr x;
- unsigned long int u;
- mp_rnd_t rnd_mode;
-#endif
{
if (u) /* if u=0, do nothing */
diff --git a/asin.c b/asin.c
index 59fa67244..27d15af2e 100644
--- a/asin.c
+++ b/asin.c
@@ -27,14 +27,7 @@ MA 02111-1307, USA. */
#include "mpfr-impl.h"
int
-#if __STDC__
mpfr_asin (mpfr_ptr asin, mpfr_srcptr x, mp_rnd_t rnd_mode)
-#else
-mpfr_asin (asin, x, rnd_mode)
- mpfr_ptr asin;
- mpfr_srcptr x;
- mp_rnd_t rnd_mode;
-#endif
{
mpfr_t xp;
mpfr_t arcs;
diff --git a/asinh.c b/asinh.c
index 28a93be2a..cf66334ce 100644
--- a/asinh.c
+++ b/asinh.c
@@ -31,14 +31,7 @@ MA 02111-1307, USA. */
asinh= ln(x+sqrt(x^2+1))
*/
int
-#if __STDC__
mpfr_asinh (mpfr_ptr y, mpfr_srcptr xt , mp_rnd_t rnd_mode)
-#else
-mpfr_asinh (y, xt, rnd_mode)
- mpfr_ptr y;
- mpfr_srcptr xt;
- mp_rnd_t rnd_mode;
-#endif
{
int inexact =0;
mpfr_t x;
diff --git a/atanh.c b/atanh.c
index 63e042aa0..49c7523dd 100644
--- a/atanh.c
+++ b/atanh.c
@@ -32,14 +32,7 @@ MA 02111-1307, USA. */
*/
int
-#if __STDC__
mpfr_atanh (mpfr_ptr y, mpfr_srcptr xt , mp_rnd_t rnd_mode)
-#else
-mpfr_atanh (y, xt, rnd_mode)
- mpfr_ptr y;
- mpfr_srcptr xt;
- mp_rnd_t rnd_mode;
-#endif
{
int inexact =0;
mpfr_t x;
diff --git a/clear.c b/clear.c
index 08869e8a5..635a02068 100644
--- a/clear.c
+++ b/clear.c
@@ -26,12 +26,7 @@ MA 02111-1307, USA. */
#include "mpfr-impl.h"
void
-#if __STDC__
mpfr_clear (mpfr_ptr m)
-#else
-mpfr_clear (m)
- mpfr_ptr m;
-#endif
{
/* be careful to always free an entire number of limbs */
(*__gmp_free_func) (MPFR_MANT(m), MPFR_ABSSIZE(m) * BYTES_PER_MP_LIMB);
diff --git a/copysign.c b/copysign.c
index 22a3468f0..1dd88dc2f 100644
--- a/copysign.c
+++ b/copysign.c
@@ -31,15 +31,7 @@ MA 02111-1307, USA. */
*/
int
-#if __STDC__
mpfr_copysign (mpfr_ptr z, mpfr_srcptr x ,mpfr_srcptr y , mp_rnd_t rnd_mode)
-#else
-mpfr_copysign (z, x,y, rnd_mode)
- mpfr_ptr z;
- mpfr_srcptr x;
- mpfr_srcptr y;
- mp_rnd_t rnd_mode;
-#endif
{
if (MPFR_IS_NAN(y))
diff --git a/cos.c b/cos.c
index 21097c51e..02461cedc 100644
--- a/cos.c
+++ b/cos.c
@@ -28,14 +28,7 @@ MA 02111-1307, USA. */
static int mpfr_cos2_aux _PROTO ((mpfr_ptr, mpfr_srcptr));
int
-#if __STDC__
mpfr_cos (mpfr_ptr y, mpfr_srcptr x, mp_rnd_t rnd_mode)
-#else
-mpfr_cos (y, x, rnd_mode)
- mpfr_ptr y;
- mpfr_srcptr x;
- mp_rnd_t rnd_mode;
-#endif
{
int K, precy, m, k, l, inexact;
mpfr_t r, s;
@@ -107,13 +100,7 @@ mpfr_cos (y, x, rnd_mode)
The absolute error on s is at most 2 * l0 * 2^(-m).
*/
static int
-#if __STDC__
mpfr_cos2_aux (mpfr_ptr s, mpfr_srcptr r)
-#else
-mpfr_cos2_aux (s, r)
- mpfr_ptr s;
- mpfr_srcptr r;
-#endif
{
unsigned int l, b = 2;
int prec_t, m = MPFR_PREC(s);
diff --git a/cosh.c b/cosh.c
index 20b8b7658..98b0ede6e 100644
--- a/cosh.c
+++ b/cosh.c
@@ -31,14 +31,7 @@ MA 02111-1307, USA. */
*/
int
-#if __STDC__
mpfr_cosh (mpfr_ptr y, mpfr_srcptr xt , mp_rnd_t rnd_mode)
-#else
-mpfr_cosh (y, xt, rnd_mode)
- mpfr_ptr y;
- mpfr_srcptr xt;
- mp_rnd_t rnd_mode;
-#endif
{
/****** Declaration ******/
diff --git a/dim.c b/dim.c
index 80b1c93d9..4715ba95d 100644
--- a/dim.c
+++ b/dim.c
@@ -32,15 +32,7 @@ MA 02111-1307, USA. */
*/
int
-#if __STDC__
mpfr_dim (mpfr_ptr z, mpfr_srcptr x ,mpfr_srcptr y , mp_rnd_t rnd_mode)
-#else
-mpfr_dim (z, x, y, rnd_mode)
- mpfr_ptr z;
- mpfr_srcptr x;
- mpfr_srcptr y;
- mp_rnd_t rnd_mode;
-#endif
{
if (MPFR_IS_NAN(x) || MPFR_IS_NAN(y) )
diff --git a/exp.c b/exp.c
index 6c7ee36c1..c2130880f 100644
--- a/exp.c
+++ b/exp.c
@@ -36,14 +36,7 @@ extern int mpfr_exp3 _PROTO((mpfr_ptr, mpfr_srcptr, mp_rnd_t));
number of operations = O(K+prec(r)/K)
*/
int
-#if __STDC__
mpfr_exp (mpfr_ptr y, mpfr_srcptr x, mp_rnd_t rnd_mode)
-#else
-mpfr_exp (y, x, rnd_mode)
- mpfr_ptr y;
- mpfr_srcptr x;
- mp_rnd_t rnd_mode;
-#endif
{
int expx, precy;
double d;
diff --git a/exp2.c b/exp2.c
index b7f1a8f0c..3768778f5 100644
--- a/exp2.c
+++ b/exp2.c
@@ -30,14 +30,7 @@ MA 02111-1307, USA. */
*/
int
-#if __STDC__
mpfr_exp2 (mpfr_ptr y, mpfr_srcptr x, mp_rnd_t rnd_mode)
-#else
-mpfr_exp2 (y, x, rnd_mode)
- mpfr_ptr y;
- mpfr_srcptr x;
- mp_rnd_t rnd_mode;
-#endif
{
int inexact =0;
diff --git a/expm1.c b/expm1.c
index 3791ef8d5..ab1c203e8 100644
--- a/expm1.c
+++ b/expm1.c
@@ -32,14 +32,7 @@ MA 02111-1307, USA. */
*/
int
-#if __STDC__
mpfr_expm1 (mpfr_ptr y, mpfr_srcptr x , mp_rnd_t rnd_mode)
-#else
-mpfr_expm1 (y, x, rnd_mode)
- mpfr_ptr y;
- mpfr_srcptr x;
- mp_rnd_t rnd_mode;
-#endif
{
int inexact = 0;
diff --git a/extract.c b/extract.c
index e4a1975c3..ee9fc3002 100644
--- a/extract.c
+++ b/extract.c
@@ -1,6 +1,6 @@
/* mpfr_extract -- bit-extraction function for the binary splitting algorithm
-Copyright (C) 2000 Free Software Foundation.
+Copyright (C) 2000, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -34,14 +34,7 @@ MA 02111-1307, USA. */
- for i>0, y = (p * B^(2^i)) mod B^(2^(i-1))
*/
void
-#if __STDC__
mpfr_extract (mpz_ptr y, mpfr_srcptr p, unsigned int i)
-#else
-mpfr_extract (y, p, i)
- mpz_ptr y;
- mpfr_srcptr p;
- unsigned int i;
-#endif
{
int two_i = 1 << i;
int two_i_2 = i ? two_i / 2 : 1;
diff --git a/factorial.c b/factorial.c
index 9a2e3f8bc..eddabea2d 100644
--- a/factorial.c
+++ b/factorial.c
@@ -1,6 +1,6 @@
/* mpfr_fac_ui -- factorial of a non-negative integer
-Copyright (C) 2001 Free Software Foundation.
+Copyright (C) 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -30,14 +30,7 @@ MA 02111-1307, USA. */
*/
int
-#if __STDC__
mpfr_fac_ui (mpfr_ptr y, unsigned long int x , mp_rnd_t rnd_mode)
-#else
-mpfr_fac_ui (y, x, rnd_mode)
- mpfr_ptr y;
- unsigned long x;
- mp_rnd_t rnd_mode;
-#endif
{
/****** Declaration ******/
diff --git a/fma.c b/fma.c
index ae37a9f80..0a6c1ce73 100644
--- a/fma.c
+++ b/fma.c
@@ -1,6 +1,6 @@
/* mpfr_fma -- Floating multiply-add
-Copyright (C) 2001 Free Software Foundation.
+Copyright (C) 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -34,16 +34,7 @@ MA 02111-1307, USA. */
*/
int
-#if __STDC__
mpfr_fma (mpfr_ptr s, mpfr_srcptr x ,mpfr_srcptr y ,mpfr_srcptr z , mp_rnd_t rnd_mode)
-#else
-mpfr_fma (s,x,y,z, rnd_mode)
- mpfr_ptr s;
- mpfr_srcptr x;
- mpfr_srcptr y;
- mpfr_srcptr z;
- mp_rnd_t rnd_mode;
-#endif
{
int inexact =0;
/* Flag calcul exacte */
diff --git a/gmp_op.c b/gmp_op.c
index 3d857fc42..15925c941 100644
--- a/gmp_op.c
+++ b/gmp_op.c
@@ -1,6 +1,6 @@
/* mpfr_cos -- cosine of a floating-point number
-Copyright (C) 2001 Free Software Foundation.
+Copyright (C) 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -26,15 +26,7 @@ MA 02111-1307, USA. */
#include "mpfr-impl.h"
int
-#if __STDC__
mpfr_mul_z (mpfr_ptr y, mpfr_srcptr x, mpz_srcptr z,mp_rnd_t rnd_mode)
-#else
-mpfr_mul_z (y, x, rnd_mode)
- mpfr_ptr y;
- mpfr_srcptr x;
- mpz_srcptr z;
- mp_rnd_t rnd_mode;
-#endif
{
mpfr_t t;
int res;
@@ -46,15 +38,7 @@ mpfr_mul_z (y, x, rnd_mode)
}
int
-#if __STDC__
mpfr_div_z (mpfr_ptr y, mpfr_srcptr x, mpz_srcptr z, mp_rnd_t rnd_mode)
-#else
-mpfr_div_z (y, x, rnd_mode)
- mpfr_ptr y;
- mpfr_srcptr x;
- mpz_srcptr z;
- mp_rnd_t rnd_mode;
-#endif
{
mpfr_t t;
int res;
@@ -66,15 +50,7 @@ mpfr_div_z (y, x, rnd_mode)
}
int
-#if __STDC__
mpfr_add_z (mpfr_ptr y, mpfr_srcptr x, mpz_srcptr z, mp_rnd_t rnd_mode)
-#else
-mpfr_add_z (y, x, rnd_mode)
- mpfr_ptr y;
- mpfr_srcptr x;
- mpz_srcptr z;
- mp_rnd_t rnd_mode;
-#endif
{
mpfr_t t;
int res;
@@ -86,15 +62,7 @@ mpfr_add_z (y, x, rnd_mode)
}
int
-#if __STDC__
mpfr_sub_z (mpfr_ptr y, mpfr_srcptr x, mpz_srcptr z,mp_rnd_t rnd_mode)
-#else
-mpfr_sub_z (y, x, rnd_mode)
- mpfr_ptr y;
- mpfr_srcptr x;
- mpz_srcptr z;
- mp_rnd_t rnd_mode;
-#endif
{
mpfr_t t;
int res;
@@ -106,15 +74,7 @@ mpfr_sub_z (y, x, rnd_mode)
}
int
-#if __STDC__
mpfr_mul_q (mpfr_ptr y, mpfr_srcptr x, mpq_srcptr z,mp_rnd_t rnd_mode)
-#else
-mpfr_mul_q (y, x, rnd_mode)
- mpfr_ptr y;
- mpfr_srcptr x;
- mpq_srcptr z;
- mp_rnd_t rnd_mode;
-#endif
{
mpfr_t t;
int res;
@@ -126,15 +86,7 @@ mpfr_mul_q (y, x, rnd_mode)
}
int
-#if __STDC__
mpfr_div_q (mpfr_ptr y, mpfr_srcptr x, mpq_srcptr z, mp_rnd_t rnd_mode)
-#else
-mpfr_div_q (y, x, rnd_mode)
- mpfr_ptr y;
- mpfr_srcptr x;
- mpq_srcptr z;
- mp_rnd_t rnd_mode;
-#endif
{
mpfr_t t;
int res;
@@ -146,15 +98,7 @@ mpfr_div_q (y, x, rnd_mode)
}
int
-#if __STDC__
mpfr_add_q (mpfr_ptr y, mpfr_srcptr x, mpq_srcptr z, mp_rnd_t rnd_mode)
-#else
-mpfr_add_q (y, x, rnd_mode)
- mpfr_ptr y;
- mpfr_srcptr x;
- mpq_srcptr z;
- mp_rnd_t rnd_mode;
-#endif
{
mpfr_t t;
int res;
@@ -166,15 +110,7 @@ mpfr_add_q (y, x, rnd_mode)
}
int
-#if __STDC__
mpfr_sub_q (mpfr_ptr y, mpfr_srcptr x, mpq_srcptr z,mp_rnd_t rnd_mode)
-#else
-mpfr_sub_q (y, x, rnd_mode)
- mpfr_ptr y;
- mpfr_srcptr x;
- mpq_srcptr z;
- mp_rnd_t rnd_mode;
-#endif
{
mpfr_t t;
int res;
diff --git a/hypot.c b/hypot.c
index 8062364ee..1e799f9a9 100644
--- a/hypot.c
+++ b/hypot.c
@@ -1,6 +1,6 @@
/* mpfr_hypot -- Euclidean distance
-Copyright (C) 2001 Free Software Foundation.
+Copyright (C) 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -32,15 +32,7 @@ MA 02111-1307, USA. */
*/
int
-#if __STDC__
mpfr_hypot (mpfr_ptr z, mpfr_srcptr x ,mpfr_srcptr y , mp_rnd_t rnd_mode)
-#else
-mpfr_hypot (z, x,y, rnd_mode)
- mpfr_ptr z;
- mpfr_srcptr x;
- mpfr_srcptr y;
- mp_rnd_t rnd_mode;
-#endif
{
int inexact;
/* Flag calcul exacte */
diff --git a/isinteger.c b/isinteger.c
index 58eba9dc1..0efc5ac09 100644
--- a/isinteger.c
+++ b/isinteger.c
@@ -1,6 +1,6 @@
/* mpfr_isinteger -- test if a mpfr variable is integer
-Copyright (C) 2001 Free Software Foundation.
+Copyright (C) 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -24,18 +24,8 @@ MA 02111-1307, USA. */
#include "mpfr.h"
#include "mpfr-impl.h"
- /* The computation of y=pow(x,z) is done by
-
- y=exp(z*log(x))=x^z
- */
-
int
-#if __STDC__
-mpfr_isinteger(mpfr_srcptr x)
-#else
-mpfr_isinteger(x)
- mpfr_srcptr x;
-#endif
+mpfr_isinteger (mpfr_srcptr x)
{
mpfr_t u;
diff --git a/log1p.c b/log1p.c
index c53c2327b..4b01063dc 100644
--- a/log1p.c
+++ b/log1p.c
@@ -1,6 +1,6 @@
/* mpfr_log1p -- Compute log(1+x)
-Copyright (C) 2001 Free Software Foundation.
+Copyright (C) 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -32,14 +32,7 @@ MA 02111-1307, USA. */
*/
int
-#if __STDC__
mpfr_log1p (mpfr_ptr y, mpfr_srcptr x , mp_rnd_t rnd_mode)
-#else
-mpfr_log1p (y, x, rnd_mode)
- mpfr_ptr y;
- mpfr_srcptr x;
- mp_rnd_t rnd_mode;
-#endif
{
int comp, inexact = 0;
diff --git a/log2.c b/log2.c
index f89dc7465..fcfc76920 100644
--- a/log2.c
+++ b/log2.c
@@ -54,13 +54,7 @@ static int mpfr_const_aux_log2 _PROTO ((mpfr_ptr, mp_rnd_t));
#undef C2
static int
-#if __STDC__
mpfr_const_aux_log2 (mpfr_ptr mylog, mp_rnd_t rnd_mode)
-#else
-mpfr_const_aux_log2 (mylog, rnd_mode)
- mpfr_ptr mylog;
- mp_rnd_t rnd_mode;
-#endif
{
int prec;
mpfr_t tmp1, tmp2, result,tmp3;
@@ -131,11 +125,7 @@ mpfr_const_aux_log2 (mylog, rnd_mode)
Then 2^N*log(2)-S'(N) <= N-1+2/N <= N for N>=2.
*/
void
-#if __STDC__
mpfr_const_log2 (mpfr_ptr x, mp_rnd_t rnd_mode)
-#else
-mpfr_const_log2 (x, rnd_mode) mpfr_ptr x; mp_rnd_t rnd_mode;
-#endif
{
int N, oldN, k, precx; mpz_t s, t, u;
diff --git a/log_base_10.c b/log_base_10.c
index 4b03293c9..b1e5e7d6f 100644
--- a/log_base_10.c
+++ b/log_base_10.c
@@ -1,6 +1,6 @@
/* mpfr_log10 -- log in base 10
-Copyright (C) 2001 Free Software Foundation.
+Copyright (C) 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -31,14 +31,7 @@ MA 02111-1307, USA. */
*/
int
-#if __STDC__
mpfr_log10 (mpfr_ptr r, mpfr_srcptr a , mp_rnd_t rnd_mode)
-#else
-mpfr_log10 (r, a, rnd_mode)
- mpfr_ptr r;
- mpfr_srcptr a;
- mp_rnd_t rnd_mode;
-#endif
{
int inexact = 0;
diff --git a/log_base_2.c b/log_base_2.c
index 64d67b270..234249e16 100644
--- a/log_base_2.c
+++ b/log_base_2.c
@@ -1,6 +1,6 @@
/* mpfr_log2 -- log base 2
-Copyright (C) 2001 Free Software Foundation.
+Copyright (C) 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -31,14 +31,7 @@ MA 02111-1307, USA. */
*/
int
-#if __STDC__
mpfr_log2 (mpfr_ptr r, mpfr_srcptr a , mp_rnd_t rnd_mode)
-#else
-mpfr_log2 (r, a, rnd_mode)
- mpfr_ptr r;
- mpfr_srcptr a;
- mp_rnd_t rnd_mode;
-#endif
{
int inexact = 0;
diff --git a/minmax.c b/minmax.c
index 416b96b81..0cb986ceb 100644
--- a/minmax.c
+++ b/minmax.c
@@ -1,6 +1,6 @@
/* mpfr_min -- min and max of x, y
-Copyright (C) 2001 Free Software Foundation.
+Copyright (C) 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -32,15 +32,7 @@ MA 02111-1307, USA. */
*/
int
-#if __STDC__
mpfr_min (mpfr_ptr z, mpfr_srcptr x ,mpfr_srcptr y ,mp_rnd_t rnd_mode)
-#else
-mpfr_min (z, x, y, rnd_mode)
- mpfr_ptr z;
- mpfr_srcptr x;
- mpfr_srcptr y;
- mp_rnd_t rnd_mode;
-#endif
{
if (MPFR_IS_NAN(x) && MPFR_IS_NAN(y) )
{
@@ -65,15 +57,7 @@ mpfr_min (z, x, y, rnd_mode)
z=y if x < y
*/
int
-#if __STDC__
mpfr_max (mpfr_ptr z, mpfr_srcptr x ,mpfr_srcptr y ,mp_rnd_t rnd_mode)
-#else
-mpfr_max (z, x, y, rnd_mode)
- mpfr_ptr z;
- mpfr_srcptr x;
- mpfr_srcptr y;
- mp_rnd_t rnd_mode;
-#endif
{
if (MPFR_IS_NAN(x) && MPFR_IS_NAN(y) )
{
diff --git a/mul.c b/mul.c
index 713fed862..9165f0430 100644
--- a/mul.c
+++ b/mul.c
@@ -1,7 +1,6 @@
/* mpfr_mul -- multiply two floating-point numbers
-Copyright (C) 1999-2001 Free Software Foundation.
-Contributed by Paul Zimmermann, INRIA Lorraine.
+Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -26,21 +25,8 @@ MA 02111-1307, USA. */
#include "mpfr.h"
#include "mpfr-impl.h"
-/* Remains to do:
-- do not use all bits of b and c when MPFR_PREC(b)>MPFR_PREC(a) or MPFR_PREC(c)>MPFR_PREC(a)
- [current complexity is O(MPFR_PREC(b)*MPFR_PREC(c))]
-*/
-
int
-#if __STDC__
mpfr_mul (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c, mp_rnd_t rnd_mode)
-#else
-mpfr_mul (a, b, c, rnd_mode)
- mpfr_ptr a;
- mpfr_srcptr b;
- mpfr_srcptr c;
- mp_rnd_t rnd_mode;
-#endif
{
unsigned int bn, cn, an, tn, k;
int cc, inexact = 0;
diff --git a/pow.c b/pow.c
index edc991713..60398c340 100644
--- a/pow.c
+++ b/pow.c
@@ -1,6 +1,6 @@
/* mpfr_pow -- power function x^y
-Copyright (C) 2001 Free Software Foundation.
+Copyright (C) 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -30,15 +30,7 @@ MA 02111-1307, USA. */
*/
int
-#if __STDC__
mpfr_pow (mpfr_ptr z, mpfr_srcptr x ,mpfr_srcptr y , mp_rnd_t rnd_mode)
-#else
-mpfr_pow (z, x, y, rnd_mode)
- mpfr_ptr z;
- mpfr_srcptr x;
- mpfr_srcptr y;
- mp_rnd_t rnd_mode;
-#endif
{
int inexact = 0;
diff --git a/pow_si.c b/pow_si.c
index 07711b908..07cb58151 100644
--- a/pow_si.c
+++ b/pow_si.c
@@ -1,6 +1,6 @@
/* mpfr_pow_si -- power function x^y with y an unsigned int
-Copyright (C) 2001 Free Software Foundation.
+Copyright (C) 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -32,15 +32,7 @@ MA 02111-1307, USA. */
*/
int
-#if __STDC__
mpfr_pow_si (mpfr_ptr y, mpfr_srcptr x, long int n, mp_rnd_t rnd_mode)
-#else
-mpfr_pow_si (y, x, n, rnd)
- mpfr_ptr y;
- mpfr_srcptr x;
- long int n;
- mp_rnd_t rnd_mode;
-#endif
{
if (n>0)
diff --git a/print_raw.c b/print_raw.c
index 7d74b6734..c78c1faa1 100644
--- a/print_raw.c
+++ b/print_raw.c
@@ -1,7 +1,7 @@
/* mpfr_print_raw -- print the internal binary representation of a
floating-point number
-Copyright (C) 1999-2001 Free Software Foundation.
+Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -59,12 +59,7 @@ mpfr_get_str_raw (char *digit_ptr, mpfr_srcptr x)
}
void
-#if __STDC__
-mpfr_print_raw(mpfr_srcptr x)
-#else
-mpfr_print_raw(x)
- mpfr_srcptr x;
-#endif
+mpfr_print_raw (mpfr_srcptr x)
{
char *str;
unsigned long alloc_size;
diff --git a/rnd_mode.c b/rnd_mode.c
index 9fe542b24..85e303c67 100644
--- a/rnd_mode.c
+++ b/rnd_mode.c
@@ -1,6 +1,6 @@
/* mpfr_set_machine_rnd_mode -- set the rounding mode for machine floats
-Copyright (C) 1999 Free Software Foundation.
+Copyright (C) 1999, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -116,12 +116,7 @@ char *out;
/* sets the machine rounding mode to the value rnd_mode */
void
-#if __STDC__
-mpfr_set_machine_rnd_mode(mp_rnd_t rnd_mode)
-#else
-mpfr_set_machine_rnd_mode(rnd_mode)
- mp_rnd_t rnd_mode;
-#endif
+mpfr_set_machine_rnd_mode (mp_rnd_t rnd_mode)
{
switch (rnd_mode) {
case GMP_RNDN: TONEAREST; break;
diff --git a/set_rnd.c b/set_rnd.c
index 080b731e6..666488e98 100644
--- a/set_rnd.c
+++ b/set_rnd.c
@@ -1,6 +1,6 @@
/* mpfr_set_default_rounding_mode -- set the default rounding mode
-Copyright (C) 1999 Free Software Foundation.
+Copyright (C) 1999, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -26,12 +26,7 @@ MA 02111-1307, USA. */
mp_rnd_t __gmp_default_rounding_mode = 0;
void
-#if __STDC__
mpfr_set_default_rounding_mode (mp_rnd_t rnd_mode)
-#else
-mpfr_set_default_rounding_mode (rnd_mode)
- mp_rnd_t rnd_mode;
-#endif
{
__gmp_default_rounding_mode = rnd_mode;
}
diff --git a/set_str_raw.c b/set_str_raw.c
index 036a7cf1e..6fbf831d8 100644
--- a/set_str_raw.c
+++ b/set_str_raw.c
@@ -1,6 +1,6 @@
/* mpfr_set_str_raw -- set a floating-point number from a binary string
-Copyright (C) 1999-2001 Free Software Foundation.
+Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -33,13 +33,7 @@ MA 02111-1307, USA. */
to hold all the bits of str. */
void
-#if __STDC__
mpfr_set_str_raw (mpfr_ptr x, char *str)
-#else
-mpfr_set_str_raw (x, str)
- mpfr_ptr x;
- char *str;
-#endif
{
char *str2, *str0, negative = 0;
unsigned long j, l, k = 0, xsize, cnt, alloc; mp_limb_t *xp;
diff --git a/sin.c b/sin.c
index 5b483ff75..524570e6e 100644
--- a/sin.c
+++ b/sin.c
@@ -1,6 +1,6 @@
/* mpfr_sin -- sine of a floating-point number
-Copyright (C) 2001 Free Software Foundation.
+Copyright (C) 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -26,14 +26,7 @@ MA 02111-1307, USA. */
#include "mpfr-impl.h"
int
-#if __STDC__
mpfr_sin (mpfr_ptr y, mpfr_srcptr x, mp_rnd_t rnd_mode)
-#else
-mpfr_sin (y, x, rnd_mode)
- mpfr_ptr y;
- mpfr_srcptr x;
- mp_rnd_t rnd_mode;
-#endif
{
int precy, m, ok, e, inexact;
mpfr_t c;
diff --git a/sinh.c b/sinh.c
index 2f03d13ba..65193dd18 100644
--- a/sinh.c
+++ b/sinh.c
@@ -1,6 +1,6 @@
/* mpfr_sinh -- hyperbolic sine
-Copyright (C) 2001 Free Software Foundation.
+Copyright (C) 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -32,14 +32,7 @@ MA 02111-1307, USA. */
*/
int
-#if __STDC__
mpfr_sinh (mpfr_ptr y, mpfr_srcptr xt , mp_rnd_t rnd_mode)
-#else
-mpfr_sinh (y, xt, rnd_mode)
- mpfr_ptr y;
- mpfr_srcptr xt;
- mp_rnd_t rnd_mode;
-#endif
{
/****** Declaration ******/
mpfr_t x;
diff --git a/sqrt.c b/sqrt.c
index e4ec07d83..aaf24a187 100644
--- a/sqrt.c
+++ b/sqrt.c
@@ -1,7 +1,6 @@
/* mpfr_sqrt -- square root of a floating-point number
-Copyright (C) 1999-2001 Free Software Foundation.
-Contributed by the Spaces project.
+Copyright (C) 1999, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -30,14 +29,7 @@ MA 02111-1307, USA. */
/* #define DEBUG */
int
-#if __STDC__
mpfr_sqrt (mpfr_ptr r, mpfr_srcptr u, mp_rnd_t rnd_mode)
-#else
-mpfr_sqrt (r, u, rnd_mode)
- mpfr_ptr r;
- mpfr_srcptr u;
- mp_rnd_t rnd_mode;
-#endif
{
mp_ptr up, rp, tmp, remp;
mp_size_t usize, rrsize;
diff --git a/sqrt_ui.c b/sqrt_ui.c
index e6a350aa1..4e044c137 100644
--- a/sqrt_ui.c
+++ b/sqrt_ui.c
@@ -1,6 +1,6 @@
/* mpfr_sqrt_ui -- square root of a machine integer
-Copyright (C) 2000-2001 Free Software Foundation.
+Copyright (C) 2000, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -28,14 +28,7 @@ MA 02111-1307, USA. */
#include "mpfr-impl.h"
int
-#if __STDC__
mpfr_sqrt_ui (mpfr_ptr r, unsigned long u, mp_rnd_t rnd_mode)
-#else
-mpfr_sqrt_ui (r, u, rnd_mode)
- mpfr_ptr r;
- unsigned long u;
- mp_rnd_t rnd_mode;
-#endif
{
if (u)
{
diff --git a/tan.c b/tan.c
index 50321a7c0..3effc8749 100644
--- a/tan.c
+++ b/tan.c
@@ -1,6 +1,6 @@
/* mpfr_tan -- tangent of a floating-point number
-Copyright (C) 2001 Free Software Foundation.
+Copyright (C) 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -27,14 +27,7 @@ MA 02111-1307, USA. */
/* computes tan(x) = sign(x)*sqrt(1/cos(x)^2-1) */
int
-#if __STDC__
mpfr_tan (mpfr_ptr y, mpfr_srcptr x, mp_rnd_t rnd_mode)
-#else
-mpfr_tan (y, x, rnd_mode)
- mpfr_ptr y;
- mpfr_srcptr x;
- mp_rnd_t rnd_mode;
-#endif
{
int precy, m, ok, e, inexact;
mpfr_t c;
diff --git a/tanh.c b/tanh.c
index 2a08fb83a..a9754dd14 100644
--- a/tanh.c
+++ b/tanh.c
@@ -1,6 +1,6 @@
/* mpfr_tanh -- hyperbolic tangent
-Copyright (C) 2001 Free Software Foundation.
+Copyright (C) 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -32,14 +32,7 @@ MA 02111-1307, USA. */
*/
int
-#if __STDC__
mpfr_tanh (mpfr_ptr y, mpfr_srcptr xt , mp_rnd_t rnd_mode)
-#else
-mpfr_tanh (y, xt, rnd_mode)
- mpfr_ptr y;
- mpfr_srcptr xt;
- mp_rnd_t rnd_mode;
-#endif
{
/****** Declaration ******/
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 53a5df789..47407b252 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -415,7 +415,7 @@ DIST_COMMON = Makefile.am Makefile.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-TAR = tar
+TAR = gtar
GZIP_ENV = --best
DEP_FILES = .deps/reuse.P .deps/tabs.P .deps/tacosh.P .deps/tadd.P \
.deps/tadd_ui.P .deps/tagm.P .deps/tasin.P .deps/tasinh.P .deps/tatan.P \
@@ -778,7 +778,7 @@ distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
- cp -pr $$/$$file $(distdir)/$$file; \
+ cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
diff --git a/ui_pow.c b/ui_pow.c
index 6ec0131cf..ac3cb52dd 100644
--- a/ui_pow.c
+++ b/ui_pow.c
@@ -1,6 +1,6 @@
/* mpfr_ui_pow -- power of n function n^x
-Copyright (C) 2001 Free Software Foundation.
+Copyright (C) 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -31,15 +31,7 @@ MA 02111-1307, USA. */
*/
int
-#if __STDC__
mpfr_ui_pow (mpfr_ptr y, unsigned long int n,mpfr_srcptr x, mp_rnd_t rnd_mode)
-#else
-mpfr_ui_pow (y, n, x, rnd_mode)
- mpfr_ptr y;
- unsigned long int n;
- mpfr_srcptr x;
- mp_rnd_t rnd_mode;
-#endif
{
int inexact;