summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2001-11-16 11:18:00 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2001-11-16 11:18:00 +0000
commit04307d9b1514959cd59b0b5278a19b4ddaecc375 (patch)
tree315b84e839a3950f1d900b9956252d87bc0db738
parent937708f95eedc3a3747fe7ea581b783a797f95ed (diff)
downloadmpfr-04307d9b1514959cd59b0b5278a19b4ddaecc375.tar.gz
added year 2001 in copyright line
removed #if __STDC__ git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1526 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r--acosh.c9
-rw-r--r--cmp.c2
-rw-r--r--cmp_abs.c2
-rw-r--r--cmp_ui.c16
-rw-r--r--div.c10
-rw-r--r--div_2exp.c10
-rw-r--r--dump.c22
-rw-r--r--exp3.c9
-rw-r--r--exp_2.c24
-rw-r--r--get_str.c27
-rw-r--r--init.c13
-rw-r--r--inp_str.c11
-rw-r--r--log.c9
-rw-r--r--log2.c2
-rw-r--r--mpf2mpfr.h21
-rw-r--r--mpfr-impl.h2
-rw-r--r--mpfr-test.h2
-rw-r--r--mpfr.h2
-rw-r--r--mpz_set_fr.c2
-rw-r--r--mul_2exp.c10
-rw-r--r--mul_ui.c10
-rw-r--r--out_str.c11
-rw-r--r--pow_ui.c10
-rw-r--r--print_rnd_mode.c25
-rw-r--r--random.c7
-rw-r--r--random2.c18
-rw-r--r--reldiff.c12
-rw-r--r--round.c2
-rw-r--r--save_expo.c2
-rw-r--r--set.c2
-rw-r--r--set_d.c20
-rw-r--r--set_dfl_prec.c7
-rw-r--r--set_f.c11
-rw-r--r--set_prc_raw.c8
-rw-r--r--set_prec.c13
-rw-r--r--set_q.c9
-rw-r--r--set_str.c24
-rw-r--r--set_z.c9
-rw-r--r--sqrtrem.c2
-rw-r--r--sub_ui.c10
-rw-r--r--trunc.c16
-rw-r--r--ui_div.c10
-rw-r--r--ui_pow_ui.c10
-rw-r--r--ui_sub.c10
44 files changed, 96 insertions, 367 deletions
diff --git a/acosh.c b/acosh.c
index 316b32fac..3e7f269b4 100644
--- a/acosh.c
+++ b/acosh.c
@@ -1,6 +1,6 @@
/* mpfr_acosh -- Inverse Hyperbolic Cosine of Unsigned Integer Number
-Copyright (C) 1999 Free Software Foundation.
+Copyright (C) 1999, 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_acosh (mpfr_ptr y, mpfr_srcptr x , mp_rnd_t rnd_mode)
-#else
-mpfr_acosh (y, x, rnd_mode)
- mpfr_ptr y;
- mpfr_srcptr x;
- mp_rnd_t rnd_mode;
-#endif
{
int inexact =0;
diff --git a/cmp.c b/cmp.c
index b8d0ee463..03eee2bed 100644
--- a/cmp.c
+++ b/cmp.c
@@ -1,6 +1,6 @@
/* mpfr_cmp -- compare two floating-point numbers
-Copyright (C) 1999 Free Software Foundation.
+Copyright (C) 1999, 2001 Free Software Foundation.
This file is part of the MPFR Library.
diff --git a/cmp_abs.c b/cmp_abs.c
index 61f158866..8a24b2249 100644
--- a/cmp_abs.c
+++ b/cmp_abs.c
@@ -1,6 +1,6 @@
/* mpfr_cmp_abs -- compare the absolute values of two nonzero FP numbers
-Copyright (C) 1999 Free Software Foundation.
+Copyright (C) 1999, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
diff --git a/cmp_ui.c b/cmp_ui.c
index 0f9d27064..7f92e34c8 100644
--- a/cmp_ui.c
+++ b/cmp_ui.c
@@ -1,6 +1,6 @@
/* mpfr_cmp_ui -- compare a floating-point number with a machine integer
-Copyright (C) 1999 Free Software Foundation.
+Copyright (C) 1999, 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_cmp_ui_2exp (mpfr_srcptr b, unsigned long int i, int f )
-#else
-mpfr_cmp_ui_2exp (b, i, f)
- mpfr_srcptr b;
- unsigned long int i;
- int f;
-#endif
{
int e, k, bn; mp_limb_t c, *bp;
@@ -81,14 +74,7 @@ mpfr_cmp_ui_2exp (b, i, f)
*/
int
-#if __STDC__
mpfr_cmp_si_2exp (mpfr_srcptr b, long int i, int f )
-#else
-mpfr_cmp_si_2exp (b, i, f)
- mpfr_srcptr b;
- long int i;
- int f;
-#endif
{
int e, k, bn, si; mp_limb_t c, *bp;
diff --git a/div.c b/div.c
index c675ff6c6..c0fc30960 100644
--- a/div.c
+++ b/div.c
@@ -1,6 +1,6 @@
/* mpfr_div -- divide two floating-point numbers
-Copyright (C) 1999 Free Software Foundation.
+Copyright (C) 1999, 2001 Free Software Foundation.
This file is part of the MPFR Library.
@@ -44,15 +44,7 @@ affiche_mp(mp_srcptr z, mp_size_t length)
#endif
int
-#if __STDC__
mpfr_div (mpfr_ptr q, mpfr_srcptr u, mpfr_srcptr v, mp_rnd_t rnd_mode)
-#else
-mpfr_div (q, u, v, rnd_mode)
- mpfr_ptr q;
- mpfr_srcptr u;
- mpfr_srcptr v;
- mp_rnd_t rnd_mode;
-#endif
{
mp_srcptr up, vp, bp;
mp_size_t usize, vsize;
diff --git a/div_2exp.c b/div_2exp.c
index 0a400a002..3de93a13b 100644
--- a/div_2exp.c
+++ b/div_2exp.c
@@ -1,6 +1,6 @@
/* mpfr_div_2exp -- divide a floating-point number by a power of two
-Copyright (C) 1999 Free Software Foundation.
+Copyright (C) 1999, 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_div_2exp (mpfr_ptr y, mpfr_srcptr x, unsigned long int n, mp_rnd_t rnd_mode)
-#else
-mpfr_div_2exp (y, x, n, rnd_mode)
- mpfr_ptr y;
- mpfr_srcptr x;
- unsigned long int n;
- mp_rnd_t rnd_mode;
-#endif
{
int inexact = 0;
diff --git a/dump.c b/dump.c
index f24798521..83757870d 100644
--- a/dump.c
+++ b/dump.c
@@ -1,26 +1,22 @@
/* mpfr_dump -- Dump a float to stdout.
- THIS IS AN INTERNAL FUNCTION WITH A MUTABLE INTERFACE. IT IS NOT SAFE TO
- CALL THIS FUNCTION DIRECTLY. IN FACT, IT IS ALMOST GUARANTEED THAT THIS
- FUNCTION WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE.
+Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+(Copied from the GNU MP Library.)
+This file is part of the MPFR Library.
-Copyright (C) 1993, 1994, 1995, 2000 Free Software Foundation, Inc.
-
-This file is part of the GNU MP Library.
-
-The GNU MP Library is free software; you can redistribute it and/or modify
+The MPFR Library is free software; you can redistribute it and/or modify
it under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
-The GNU MP Library is distributed in the hope that it will be useful, but
+The MPFR Library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
License for more details.
You should have received a copy of the GNU Library General Public License
-along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+along with the MPFR Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
@@ -32,13 +28,7 @@ MA 02111-1307, USA. */
#include "mpfr-impl.h"
void
-#if __STDC__
mpfr_dump (mpfr_srcptr u, mp_rnd_t rnd_mode)
-#else
-mpfr_dump (u, rnd_mode)
- mpfr_srcptr u;
- mp_rnd_t rnd_mode;
-#endif
{
mp_exp_t exp;
char *str;
diff --git a/exp3.c b/exp3.c
index 8e8c95ff9..b46b5b74f 100644
--- a/exp3.c
+++ b/exp3.c
@@ -1,6 +1,6 @@
/* mpfr_exp -- exponential of a floating-point number
-Copyright (C) 1999 Free Software Foundation.
+Copyright (C) 1999, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -119,14 +119,7 @@ mpfr_exp_rational (mpfr_ptr y, mpz_srcptr p, int r, int m)
#define shift (BITS_PER_MP_LIMB/2)
int
-#if __STDC__
mpfr_exp3 (mpfr_ptr y, mpfr_srcptr x, mp_rnd_t rnd_mode)
-#else
-mpfr_exp3 (y, x, rnd_mode)
- mpfr_ptr y;
- mpfr_srcptr x;
- mp_rnd_t rnd_mode;
-#endif
{
mpfr_t t;
mpfr_t x_copy;
diff --git a/exp_2.c b/exp_2.c
index b7b5686fc..0c8298969 100644
--- a/exp_2.c
+++ b/exp_2.c
@@ -1,7 +1,7 @@
/* mpfr_exp_2 -- exponential of a floating-point number
using Brent's algorithms in O(n^(1/2)*M(n)) and O(n^(1/3)*M(n))
-Copyright (C) 1999-2000 Free Software Foundation.
+Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -73,14 +73,7 @@ _mpfr_cuberoot (unsigned long n)
Otherwise do nothing and return 0.
*/
static mp_exp_t
-#if __STDC__
mpz_normalize (mpz_t rop, mpz_t z, int q)
-#else
-mpz_normalize (rop, z, q)
- mpz_t rop;
- mpz_t z;
- int q;
-#endif
{
int k;
@@ -100,15 +93,7 @@ mpz_normalize (rop, z, q)
Returns target.
*/
static int
-#if __STDC__
mpz_normalize2 (mpz_t rop, mpz_t z, int expz, int target)
-#else
-mpz_normalize2 (rop, z, expz, target)
- mpz_t rop;
- mpz_t z;
- int expz;
- int target;
-#endif
{
if (target > expz) mpz_div_2exp(rop, z, target-expz);
else mpz_mul_2exp(rop, z, expz-target);
@@ -121,14 +106,7 @@ mpz_normalize2 (rop, z, expz, target)
power series. The resulting complexity is O(n^(1/3)*M(n)).
*/
int
-#if __STDC__
mpfr_exp_2 (mpfr_ptr y, mpfr_srcptr x, mp_rnd_t rnd_mode)
-#else
-mpfr_exp_2 (y, x, rnd_mode)
- mpfr_ptr y;
- mpfr_srcptr x;
- mp_rnd_t rnd_mode;
-#endif
{
int n, expx, K, precy, q, k, l, err, exps, inexact;
mpfr_t r, s, t; mpz_t ss;
diff --git a/get_str.c b/get_str.c
index 97027f306..0770e0500 100644
--- a/get_str.c
+++ b/get_str.c
@@ -1,6 +1,6 @@
/* mpfr_get_str -- output a floating-point number to a string
-Copyright (C) 1999 Free Software Foundation.
+Copyright (C) 1999, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -19,8 +19,6 @@ along with the MPFR Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
-/* #define DEBUG */
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -38,18 +36,8 @@ MA 02111-1307, USA. */
For op = 3.1416 we get str = "31416" and expptr=1.
*/
char*
-#if __STDC__
mpfr_get_str (char *str, mp_exp_t *expptr, int base, size_t n,
mpfr_srcptr op, mp_rnd_t rnd_mode)
-#else
-mpfr_get_str (str, expptr, base, n, op, rnd_mode)
- char *str;
- mp_exp_t *expptr;
- int base;
- size_t n;
- mpfr_srcptr op;
- mp_rnd_t rnd_mode;
-#endif
{
double d;
long e, q, div, p, err, prec, sh;
@@ -119,17 +107,11 @@ mpfr_get_str (str, expptr, base, n, op, rnd_mode)
n = (int) (__mp_bases[base].chars_per_bit_exactly * MPFR_PREC(op));
if (n==0) n=1;
}
-#ifdef DEBUG
- printf("f=%d n=%d MPFR_EXP(op)=%d MPFR_PREC(op)=%d\n", f, n, e, MPFR_PREC(op));
-#endif
/* now the first n digits of the mantissa are obtained from
rnd(op*base^(n-f)) */
if (pow2) prec = n*pow2;
else
prec = 1 + (long) ((double) n / __mp_bases[base].chars_per_bit_exactly);
-#ifdef DEBUG
- printf("prec=%d\n", prec);
-#endif
err = 5;
q = prec + err;
/* one has to use at least q bits */
@@ -168,17 +150,10 @@ mpfr_get_str (str, expptr, base, n, op, rnd_mode)
mpfr_div(a, b, a, rnd_mode);
}
/* now a is an approximation by default of 1/base^(f-n) */
-#ifdef DEBUG
- printf("base^(n-f)=%1.20e\n", mpfr_get_d(a));
-#endif
mpfr_mul(b, op, a, rnd_mode);
}
}
if (neg) MPFR_CHANGE_SIGN(b); /* put b positive */
-#ifdef DEBUG
- printf("p=%d b=%1.20e\n", p, mpfr_get_d(b));
- printf("q=%d 2*prec+BITS_PER_MP_LIMB=%d\n", q, 2*prec+BITS_PER_MP_LIMB);
-#endif
if (q>2*prec+BITS_PER_MP_LIMB) {
/* if the intermediate precision exceeds twice that of the input,
a worst-case for the division cannot occur */
diff --git a/init.c b/init.c
index 4b0e86474..acfe7c763 100644
--- a/init.c
+++ b/init.c
@@ -1,6 +1,6 @@
/* mpfr_init -- initialize a floating-point number
-Copyright (C) 1999 Free Software Foundation.
+Copyright (C) 1999, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -27,13 +27,7 @@ MA 02111-1307, USA. */
#include "mpfr-impl.h"
void
-#if __STDC__
mpfr_init2 (mpfr_ptr x, mp_prec_t p)
-#else
-mpfr_init2 (x, p)
- mpfr_ptr x;
- mp_prec_t p;
-#endif
{
mp_prec_t xsize;
@@ -52,12 +46,7 @@ mpfr_init2 (x, p)
}
void
-#if __STDC__
mpfr_init (mpfr_ptr x)
-#else
-mpfr_init (x)
- mpfr_ptr x;
-#endif
{
mpfr_init2(x, __mpfr_default_fp_bit_precision);
}
diff --git a/inp_str.c b/inp_str.c
index 422e5f797..5fc9430d2 100644
--- a/inp_str.c
+++ b/inp_str.c
@@ -1,7 +1,8 @@
/* mpf_inp_str(dest_float, stream, base) -- Input a number in base
BASE from stdio stream STREAM and store the result in DEST_FLOAT.
-Copied from GMP, file mpf/inp_str.c.
+Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+(Copied from GMP, file mpf/inp_str.c)
This file is part of the MPFR Library.
@@ -28,15 +29,7 @@ MA 02111-1307, USA. */
#include "mpfr-impl.h"
size_t
-#if __STDC__
mpfr_inp_str (mpfr_ptr rop, FILE *stream, int base, mp_rnd_t rnd_mode)
-#else
-mpfr_inp_str (rop, stream, base, rnd_mode)
- mpfr_ptr rop;
- FILE *stream;
- int base;
- mp_rnd_t rnd_mode;
-#endif
{
char *str;
size_t alloc_size, str_size;
diff --git a/log.c b/log.c
index 1fc459ac8..38d9a2e6c 100644
--- a/log.c
+++ b/log.c
@@ -1,6 +1,6 @@
/* mpfr_log -- natural logarithm of a floating-point number
-Copyright (C) 1999 Free Software Foundation.
+Copyright (C) 1999, 2001 Free Software Foundation.
This file is part of the MPFR Library.
@@ -42,14 +42,7 @@ MA 02111-1307, USA. */
/* #define DEBUG */
int
-#if __STDC__
mpfr_log (mpfr_ptr r, mpfr_srcptr a, mp_rnd_t rnd_mode)
-#else
-mpfr_log (r, a, rnd_mode)
- mpfr_ptr r;
- mpfr_srcptr a;
- mp_rnd_t rnd_mode;
-#endif
{
int m, bool, size, cancel, inexact = 0;
mp_prec_t p, q;
diff --git a/log2.c b/log2.c
index 21d5edc4a..c2d428b48 100644
--- a/log2.c
+++ b/log2.c
@@ -1,6 +1,6 @@
/* mpfr_const_log2 -- compute natural logarithm of 2
-Copyright (C) 1999 Free Software Foundation.
+Copyright (C) 1999, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
diff --git a/mpf2mpfr.h b/mpf2mpfr.h
index 4e5121eba..ac24fccea 100644
--- a/mpf2mpfr.h
+++ b/mpf2mpfr.h
@@ -1,3 +1,24 @@
+/* mpf2mpfr.h -- Compatibility include file with mpf.
+
+Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+
+This file is part of the MPFR Library.
+
+The MPFR Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The MPFR Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the MPFR Library; see the file COPYING.LIB. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
+
/* types */
#define mpf_t mpfr_t
diff --git a/mpfr-impl.h b/mpfr-impl.h
index d69b3fc3a..81ff1cdf1 100644
--- a/mpfr-impl.h
+++ b/mpfr-impl.h
@@ -1,6 +1,6 @@
/* Utilities for MPFR developers, not exported.
-Copyright (C) 1999-2000 Free Software Foundation.
+Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
diff --git a/mpfr-test.h b/mpfr-test.h
index 8db884ca9..7e7d1eb9f 100644
--- a/mpfr-test.h
+++ b/mpfr-test.h
@@ -1,6 +1,6 @@
/* auxiliary functions for MPFR tests.
-Copyright (C) 1999-2000 Free Software Foundation.
+Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
diff --git a/mpfr.h b/mpfr.h
index bf77867ba..4096c323e 100644
--- a/mpfr.h
+++ b/mpfr.h
@@ -1,6 +1,6 @@
/* mpfr.h -- Include file for mpfr.
-Copyright (C) 1999 Free Software Foundation.
+Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
diff --git a/mpz_set_fr.c b/mpz_set_fr.c
index 01e53e5f9..8eae2b139 100644
--- a/mpz_set_fr.c
+++ b/mpz_set_fr.c
@@ -1,6 +1,6 @@
/* mpz_set_fr -- set a multiple-precision integer from a floating-point number
-Copyright (C) 2000 Free Software Foundation.
+Copyright (C) 2000, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
diff --git a/mul_2exp.c b/mul_2exp.c
index c32df4092..b47f2f731 100644
--- a/mul_2exp.c
+++ b/mul_2exp.c
@@ -1,6 +1,6 @@
/* mpfr_mul_2exp -- multiply a floating-point number by a power of two
-Copyright (C) 1999 Free Software Foundation.
+Copyright (C) 1999, 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_2exp (mpfr_ptr y, mpfr_srcptr x, unsigned long int n, mp_rnd_t rnd_mode)
-#else
-mpfr_mul_2exp (y, x, n, rnd_mode)
- mpfr_ptr y;
- mpfr_srcptr x;
- unsigned long int n;
- mp_rnd_t rnd_mode;
-#endif
{
int inexact = 0;
diff --git a/mul_ui.c b/mul_ui.c
index 5866e737f..e90ded5ae 100644
--- a/mul_ui.c
+++ b/mul_ui.c
@@ -1,6 +1,6 @@
/* mpfr_mul_ui -- multiply a floating-point number by a machine integer
-Copyright (C) 1999 Free Software Foundation.
+Copyright (C) 1999, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -27,15 +27,7 @@ MA 02111-1307, USA. */
#include "mpfr-impl.h"
int
-#if __STDC__
mpfr_mul_ui (mpfr_ptr y, mpfr_srcptr x, unsigned long int u, mp_rnd_t rnd_mode)
-#else
-mpfr_mul_ui (y, x, u, rnd_mode)
- mpfr_ptr y;
- mpfr_srcptr x;
- unsigned long int u;
- mp_rnd_t rnd_mode;
-#endif
{
mp_limb_t *my, *old_my;
unsigned long xn, yn, cnt, c;
diff --git a/out_str.c b/out_str.c
index cebeb8fe9..5b09bfddb 100644
--- a/out_str.c
+++ b/out_str.c
@@ -1,6 +1,6 @@
/* mpfr_out_str -- output a floating-point number to a stream
-Copyright (C) 1999 Free Software Foundation.
+Copyright (C) 1999, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -27,17 +27,8 @@ MA 02111-1307, USA. */
#include "mpfr-impl.h"
size_t
-#if __STDC__
mpfr_out_str (FILE *stream, int base, size_t n_digits, mpfr_srcptr op,
mp_rnd_t rnd_mode)
-#else
-mpfr_out_str (stream, base, n_digits, op, rnd_mode)
- FILE *stream;
- int base;
- size_t n_digits;
- mpfr_srcptr op;
- mp_rnd_t rnd_mode;
-#endif
{
char *s, *s0;
size_t l;
diff --git a/pow_ui.c b/pow_ui.c
index bb0f39599..968eb84ac 100644
--- a/pow_ui.c
+++ b/pow_ui.c
@@ -1,7 +1,7 @@
/* mpfr_pow_ui-- compute the power of a floating-point
by a machine integer
-Copyright (C) 1999 Free Software Foundation.
+Copyright (C) 1999, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -27,15 +27,7 @@ MA 02111-1307, USA. */
/* sets x to y^n, and return 0 if exact, non-zero otherwise */
int
-#if __STDC__
mpfr_pow_ui (mpfr_ptr x, mpfr_srcptr y, unsigned long int n, mp_rnd_t rnd)
-#else
-mpfr_pow_ui (x, y, n, rnd)
- mpfr_ptr x;
- mpfr_srcptr y;
- unsigned long int n;
- mp_rnd_t rnd;
-#endif
{
long int i, err;
unsigned long m;
diff --git a/print_rnd_mode.c b/print_rnd_mode.c
index 9086d928d..860f96a99 100644
--- a/print_rnd_mode.c
+++ b/print_rnd_mode.c
@@ -1,6 +1,6 @@
/* mpfr_print_rnd_mode -- convert a given rounding mode to a string
-Copyright (C) 1999 Free Software Foundation.
+Copyright (C) 1999, 2001 Free Software Foundation.
This file is part of the MPFR Library.
@@ -26,19 +26,20 @@ MA 02111-1307, USA. */
#include "mpfr.h"
char *
-#if __STDC__
-mpfr_print_rnd_mode(mp_rnd_t rnd_mode)
-#else
-mpfr_print_rnd_mode(rnd_mode)
- mp_rnd_t rnd_mode;
-#endif
+mpfr_print_rnd_mode (mp_rnd_t rnd_mode)
{
switch (rnd_mode)
{
- case GMP_RNDD: return("GMP_RNDD");
- case GMP_RNDU: return("GMP_RNDU");
- case GMP_RNDN: return("GMP_RNDN");
- case GMP_RNDZ: return("GMP_RNDZ");
- default: fprintf(stderr, "unknown rounding mode\n"); exit(1);
+ case GMP_RNDD:
+ return ("GMP_RNDD");
+ case GMP_RNDU:
+ return ("GMP_RNDU");
+ case GMP_RNDN:
+ return ("GMP_RNDN");
+ case GMP_RNDZ:
+ return ("GMP_RNDZ");
+ default:
+ fprintf (stderr, "unknown rounding mode\n");
+ exit (1);
}
}
diff --git a/random.c b/random.c
index 311a204b8..e65b793a5 100644
--- a/random.c
+++ b/random.c
@@ -1,6 +1,6 @@
/* mpfr_random -- generate a random floating-point number
-Copyright (C) 1999 Free Software Foundation.
+Copyright (C) 1999, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -29,12 +29,7 @@ MA 02111-1307, USA. */
/* Computes a random mpfr in [0, 1[ with precision MPFR_PREC */
void
-#if __STDC__
mpfr_random (mpfr_ptr x)
-#else
-mpfr_random (x)
- mpfr_ptr x;
-#endif
{
mp_limb_t *xp; unsigned long xn, cnt, prec = MPFR_PREC(x);
diff --git a/random2.c b/random2.c
index b7b2f8d7f..6cc28b4c9 100644
--- a/random2.c
+++ b/random2.c
@@ -2,22 +2,23 @@
long runs of consecutive ones and zeros in the binary representation.
Intended for testing of other MP routines.
-Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+(Copied from the GNU MP Library.)
-This file is part of the GNU MP Library.
+This file is part of the MPFR Library.
-The GNU MP Library is free software; you can redistribute it and/or modify
+The MPFR Library is free software; you can redistribute it and/or modify
it under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
-The GNU MP Library is distributed in the hope that it will be useful, but
+The MPFR Library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
License for more details.
You should have received a copy of the GNU Library General Public License
-along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+along with the MPFR Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
@@ -29,14 +30,7 @@ MA 02111-1307, USA. */
#include "mpfr-impl.h"
void
-#if __STDC__
mpfr_random2 (mpfr_ptr x, mp_size_t size, mp_exp_t exp)
-#else
-mpfr_random2 (x, size, exp)
- mpfr_ptr x;
- mp_size_t size;
- mp_exp_t exp;
-#endif
{
mp_size_t xn;
unsigned long cnt;
diff --git a/reldiff.c b/reldiff.c
index 5687d4a54..312c15447 100644
--- a/reldiff.c
+++ b/reldiff.c
@@ -1,6 +1,6 @@
/* mpfr_reldiff -- compute relative difference of two floating-point numbers.
-Copyright (C) 2000 Free Software Foundation.
+Copyright (C) 2000, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -27,15 +27,7 @@ MA 02111-1307, USA. */
/* reldiff(b, c) = abs(b-c)/b */
void
-#if __STDC__
-mpfr_reldiff(mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c, mp_rnd_t rnd_mode)
-#else
-mpfr_reldiff(a, b, c, rnd_mode)
- mpfr_ptr a;
- mpfr_srcptr b;
- mpfr_srcptr c;
- mp_rnd_t rnd_mode;
-#endif
+mpfr_reldiff (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c, mp_rnd_t rnd_mode)
{
mpfr_t b_copy;
diff --git a/round.c b/round.c
index cd3782260..94109c8c4 100644
--- a/round.c
+++ b/round.c
@@ -1,7 +1,7 @@
/* mpfr_round_raw_generic, mpfr_round_raw2, mpfr_round_raw, mpfr_round,
mpfr_can_round, mpfr_can_round_raw -- various rounding functions
-Copyright (C) 1999 Free Software Foundation.
+Copyright (C) 1999, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
diff --git a/save_expo.c b/save_expo.c
index 973fe7189..13d54946f 100644
--- a/save_expo.c
+++ b/save_expo.c
@@ -1,6 +1,6 @@
/* Save/restore the minimum and maximum exponents.
-Copyright (C) 1999 Free Software Foundation.
+Copyright (C) 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
diff --git a/set.c b/set.c
index 9e86b7f3d..de8ddffde 100644
--- a/set.c
+++ b/set.c
@@ -1,6 +1,6 @@
/* mpfr_set -- copy of a floating-point number
-Copyright (C) 1999 Free Software Foundation.
+Copyright (C) 1999, 2001 Free Software Foundation.
This file is part of the MPFR Library.
diff --git a/set_d.c b/set_d.c
index ccfff3e84..02e8e11e5 100644
--- a/set_d.c
+++ b/set_d.c
@@ -1,7 +1,7 @@
/* mpfr_set_d, mpfr_get_d -- convert a multiple precision floating-point number
from/to a machine double precision float
-Copyright (C) 1999 Free Software Foundation.
+Copyright (C) 1999, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -230,14 +230,7 @@ __mpfr_scale2 (double d, int exp)
/* End of part included from gmp */
int
-#if __STDC__
mpfr_set_d (mpfr_ptr r, double d, mp_rnd_t rnd_mode)
-#else
-mpfr_set_d (r, d, rnd_mode)
- mpfr_ptr r;
- double d;
- mp_rnd_t rnd_mode;
-#endif
{
int signd, sizer, sizetmp, inexact;
unsigned int cnt;
@@ -305,13 +298,7 @@ mpfr_set_d (r, d, rnd_mode)
}
double
-#if __STDC__
mpfr_get_d2 (mpfr_srcptr src, long e)
-#else
-mpfr_get_d2 (src, e)
- mpfr_srcptr src;
- long e;
-#endif
{
double res;
mp_size_t size, i, n_limbs_to_use;
@@ -374,12 +361,7 @@ mpfr_get_d2 (src, e)
}
double
-#if __STDC__
mpfr_get_d (mpfr_srcptr src)
-#else
-mpfr_get_d (src)
- mpfr_srcptr src;
-#endif
{
return mpfr_get_d2 (src, MPFR_EXP(src));
}
diff --git a/set_dfl_prec.c b/set_dfl_prec.c
index ecfd11ac9..82b2bdd75 100644
--- a/set_dfl_prec.c
+++ b/set_dfl_prec.c
@@ -1,6 +1,6 @@
/* mpfr_set_default_prec, mpfr_get_default_prec -- set/get default precision
-Copyright (C) 1999, 2000 Free Software Foundation.
+Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -27,12 +27,7 @@ MA 02111-1307, USA. */
mp_prec_t __mpfr_default_fp_bit_precision = 53;
void
-#if __STDC__
mpfr_set_default_prec (mp_prec_t prec_in_bits)
-#else
-mpfr_set_default_prec (prec_in_bits)
- mp_prec_t prec_in_bits;
-#endif
{
__mpfr_default_fp_bit_precision = prec_in_bits;
}
diff --git a/set_f.c b/set_f.c
index 93bfd5501..d4079c3d0 100644
--- a/set_f.c
+++ b/set_f.c
@@ -1,6 +1,6 @@
/* mpfr_set_f -- set a MPFR number from a GNU MPF number
-Copyright (C) 1999-2000 Free Software Foundation.
+Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -27,14 +27,7 @@ MA 02111-1307, USA. */
#include "mpfr-impl.h"
int
-#if __STDC__
-mpfr_set_f(mpfr_ptr y, mpf_srcptr x, mp_rnd_t rnd_mode)
-#else
-mpfr_set_f(y, x, rnd_mode)
- mpfr_ptr y;
- mpf_srcptr x;
- mp_rnd_t rnd_mode;
-#endif
+mpfr_set_f (mpfr_ptr y, mpf_srcptr x, mp_rnd_t rnd_mode)
{
mp_limb_t *my, *mx, *tmp;
unsigned long cnt, sx, sy;
diff --git a/set_prc_raw.c b/set_prc_raw.c
index 79b9ae9a2..14c0e6f83 100644
--- a/set_prc_raw.c
+++ b/set_prc_raw.c
@@ -1,6 +1,6 @@
/* mpfr_set_prec_raw -- reset the precision of a floating-point number
-Copyright (C) 2000 Free Software Foundation.
+Copyright (C) 2000, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -27,13 +27,7 @@ MA 02111-1307, USA. */
#include "mpfr-impl.h"
void
-#if __STDC__
mpfr_set_prec_raw (mpfr_ptr x, mp_prec_t p)
-#else
-mpfr_set_prec_raw (x, p)
- mpfr_ptr x;
- mp_prec_t p;
-#endif
{
if (p==0) {
fprintf(stderr, "*** cannot set precision to 0 bits\n"); exit(1);
diff --git a/set_prec.c b/set_prec.c
index a10b14775..ee19c31da 100644
--- a/set_prec.c
+++ b/set_prec.c
@@ -1,6 +1,6 @@
/* mpfr_set_prec -- reset the precision of a floating-point number
-Copyright (C) 1999 Free Software Foundation.
+Copyright (C) 1999, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -27,13 +27,7 @@ MA 02111-1307, USA. */
#include "mpfr-impl.h"
int
-#if __STDC__
mpfr_set_prec (mpfr_ptr x, mp_prec_t p)
-#else
-mpfr_set_prec (x, p)
- mpfr_ptr x;
- mp_prec_t p;
-#endif
{
mp_prec_t xsize;
@@ -54,12 +48,7 @@ mpfr_set_prec (x, p)
}
mp_prec_t
-#if __STDC__
mpfr_get_prec (mpfr_srcptr x)
-#else
-mpfr_get_prec (x)
- mpfr_srcptr x;
-#endif
{
return MPFR_PREC(x);
}
diff --git a/set_q.c b/set_q.c
index 21e0025c4..f6fce2376 100644
--- a/set_q.c
+++ b/set_q.c
@@ -1,6 +1,6 @@
/* mpfr_set_q -- set a floating-point number from a multiple-precision rational
-Copyright (C) 2000 Free Software Foundation.
+Copyright (C) 2000, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -27,14 +27,7 @@ MA 02111-1307, USA. */
/* set f to the rational q */
int
-#if __STDC__
mpfr_set_q (mpfr_ptr f, mpq_srcptr q, mp_rnd_t rnd)
-#else
-mpfr_set_q (f, q, rnd)
- mpfr_ptr f;
- mpq_srcptr q;
- mp_rnd_t rnd;
-#endif
{
mpz_srcptr num, den;
mpfr_t n, d;
diff --git a/set_str.c b/set_str.c
index da08a79cf..73085cca4 100644
--- a/set_str.c
+++ b/set_str.c
@@ -1,6 +1,6 @@
/* mpfr_set_str -- set a floating-point number from a string
-Copyright (C) 2000 Free Software Foundation.
+Copyright (C) 2000, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -30,15 +30,7 @@ MA 02111-1307, USA. */
#include "mpfr-impl.h"
int
-#if __STDC__
mpfr_set_str (mpfr_ptr x, __gmp_const char *str, int base, mp_rnd_t rnd_mode)
-#else
-mpfr_set_str (x, str, base, rnd_mode)
- mpfr_ptr x;
- __gmp_const char *str;
- int base;
- mp_rnd_t rnd_mode;
-#endif
{
char negative = 0, *endptr;
unsigned long k = 0, l, q;
@@ -135,17 +127,9 @@ mpfr_set_str (x, str, base, rnd_mode)
}
int
-#if __STDC__
-mpfr_init_set_str(mpfr_ptr x, char *str, int base, mp_rnd_t rnd_mode)
-#else
-mpfr_init_set_str(x, str, base, rnd_mode)
- mpfr_ptr x;
- char *str;
- int base;
- mp_rnd_t rnd_mode;
-#endif
+mpfr_init_set_str (mpfr_ptr x, char *str, int base, mp_rnd_t rnd_mode)
{
- mpfr_init(x);
- return mpfr_set_str(x, str, base, rnd_mode);
+ mpfr_init (x);
+ return mpfr_set_str (x, str, base, rnd_mode);
}
diff --git a/set_z.c b/set_z.c
index 344ea03b0..40d94505b 100644
--- a/set_z.c
+++ b/set_z.c
@@ -1,6 +1,6 @@
/* mpfr_set_z -- set a floating-point number from a multiple-precision integer
-Copyright (C) 1999 Free Software Foundation.
+Copyright (C) 1999, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -27,14 +27,7 @@ MA 02111-1307, USA. */
/* set f to the integer z */
int
-#if __STDC__
mpfr_set_z (mpfr_ptr f, mpz_srcptr z, mp_rnd_t rnd)
-#else
-mpfr_set_z (f, z, rnd)
- mpfr_ptr f;
- mpz_srcptr z;
- mp_rnd_t rnd;
-#endif
{
mp_size_t fn, zn, dif, sh;
int k, sign_z;
diff --git a/sqrtrem.c b/sqrtrem.c
index 83e8096ee..37dc4ed1d 100644
--- a/sqrtrem.c
+++ b/sqrtrem.c
@@ -1,7 +1,7 @@
/* mpn_sqrtrem_new -- integer square root with remainder
(should be directly integrated in a future release of GNU MP)
-Copyright (C) 1999, 2000 Free Software Foundation.
+Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
diff --git a/sub_ui.c b/sub_ui.c
index 09aa26ff3..b97ec6f0b 100644
--- a/sub_ui.c
+++ b/sub_ui.c
@@ -1,6 +1,6 @@
/* mpfr_sub_ui -- subtract a floating-point number and a machine integer
-Copyright (C) 2000 Free Software Foundation.
+Copyright (C) 2000, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -27,15 +27,7 @@ MA 02111-1307, USA. */
#include "mpfr-impl.h"
int
-#if __STDC__
mpfr_sub_ui (mpfr_ptr y, mpfr_srcptr x, unsigned long int u, mp_rnd_t rnd_mode)
-#else
-mpfr_sub_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/trunc.c b/trunc.c
index d06e3abf8..b85a28c2f 100644
--- a/trunc.c
+++ b/trunc.c
@@ -1,22 +1,22 @@
/* mpf_trunc, mpf_floor, mpf_ceil -- Assign a float from another float while
rounding it to an integer.
-Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+Copyright (C) 1999, 2001 Free Software Foundation, Inc.
-This file is part of the GNU MP Library.
+This file is part of the MPFR Library.
-The GNU MP Library is free software; you can redistribute it and/or modify
+The MPFR Library is free software; you can redistribute it and/or modify
it under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
-The GNU MP Library is distributed in the hope that it will be useful, but
+The MPFR Library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
License for more details.
You should have received a copy of the GNU Library General Public License
-along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+along with the MPFR Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
@@ -66,13 +66,7 @@ mpn_zero_p (p, n)
#endif
void
-#if __STDC__
FUNC_NAME (mpfr_ptr r, mpfr_srcptr u)
-#else
-FUNC_NAME (r, u)
- mpfr_ptr r;
- mpfr_srcptr u;
-#endif
{
mp_ptr rp, up;
mp_size_t usize;
diff --git a/ui_div.c b/ui_div.c
index 884a56df6..90a13dcf5 100644
--- a/ui_div.c
+++ b/ui_div.c
@@ -1,6 +1,6 @@
/* mpfr_ui_div -- divide a machine integer by a floating-point number
-Copyright (C) 2000 Free Software Foundation.
+Copyright (C) 2000, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -27,15 +27,7 @@ MA 02111-1307, USA. */
#include "mpfr-impl.h"
int
-#if __STDC__
mpfr_ui_div (mpfr_ptr y, unsigned long int u, mpfr_srcptr x, mp_rnd_t rnd_mode)
-#else
-mpfr_ui_div (y, u, x, rnd_mode)
- mpfr_ptr y;
- unsigned long int u;
- mpfr_srcptr x;
- mp_rnd_t rnd_mode;
-#endif
{
mpfr_t uu;
mp_limb_t up[1];
diff --git a/ui_pow_ui.c b/ui_pow_ui.c
index 8db586384..f3df056ad 100644
--- a/ui_pow_ui.c
+++ b/ui_pow_ui.c
@@ -1,6 +1,6 @@
/* mpfr_ui_pow_ui -- compute the power beetween two machine integer
-Copyright (C) 1999 Free Software Foundation.
+Copyright (C) 1999, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -26,16 +26,8 @@ MA 02111-1307, USA. */
int
-#if __STDC__
mpfr_ui_pow_ui (mpfr_ptr x, unsigned long int y, unsigned long int n,
mp_rnd_t rnd)
-#else
-mpfr_ui_pow_ui (x, y, n, rnd)
- mpfr_ptr x;
- unsigned long int y;
- unsigned long int n;
- mp_rnd_t rnd;
-#endif
{
long int i, err;
unsigned long m;
diff --git a/ui_sub.c b/ui_sub.c
index e882882e9..9a4345ae8 100644
--- a/ui_sub.c
+++ b/ui_sub.c
@@ -1,6 +1,6 @@
/* mpfr_ui_sub -- divide a machine integer by a floating-point number
-Copyright (C) 2000 Free Software Foundation.
+Copyright (C) 2000, 2001 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -27,15 +27,7 @@ MA 02111-1307, USA. */
#include "mpfr-impl.h"
int
-#if __STDC__
mpfr_ui_sub (mpfr_ptr y, unsigned long int u, mpfr_srcptr x, mp_rnd_t rnd_mode)
-#else
-mpfr_ui_sub (y, u, x, rnd_mode)
- mpfr_ptr y;
- unsigned long int u;
- mpfr_srcptr x;
- mp_rnd_t rnd_mode;
-#endif
{
mpfr_t uu;
mp_limb_t up[1];