summaryrefslogtreecommitdiff
path: root/mpfr
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2001-02-11 01:24:11 +0100
committerKevin Ryde <user42@zip.com.au>2001-02-11 01:24:11 +0100
commit5b76145955793e47368b27fe72b47747256d0edc (patch)
tree4d66fcb042cda7ee71b38cf2b57a67439631a5fc /mpfr
parent5f76a7de493a80e02505c76296be7fe77f17ee76 (diff)
downloadgmp-5b76145955793e47368b27fe72b47747256d0edc.tar.gz
* mpfr/add.c,agm.c,exp2.c,exp3.c,generic.c,log2.c,pi.c,print_raw.c,
set_d.c,sin_cos.c,sqrtrem.c,sub.c: Apply some tweaks for K&R.
Diffstat (limited to 'mpfr')
-rw-r--r--mpfr/add.c2
-rw-r--r--mpfr/agm.c9
-rw-r--r--mpfr/exp2.c16
-rw-r--r--mpfr/exp3.c4
-rw-r--r--mpfr/generic.c4
-rw-r--r--mpfr/log2.c4
-rw-r--r--mpfr/pi.c4
-rw-r--r--mpfr/print_raw.c2
-rw-r--r--mpfr/set_d.c4
-rw-r--r--mpfr/sin_cos.c4
-rw-r--r--mpfr/sub.c4
11 files changed, 31 insertions, 26 deletions
diff --git a/mpfr/add.c b/mpfr/add.c
index 63cbb9109..e24054924 100644
--- a/mpfr/add.c
+++ b/mpfr/add.c
@@ -29,7 +29,7 @@ MA 02111-1307, USA. */
extern void mpfr_sub1 _PROTO((mpfr_ptr, mpfr_srcptr, mpfr_srcptr,
mp_rnd_t, int));
-void mpfr_add1 (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mp_rnd_t, int);
+void mpfr_add1 _PROTO ((mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mp_rnd_t, int));
#define ONE ((mp_limb_t) 1)
diff --git a/mpfr/agm.c b/mpfr/agm.c
index 75b5762d3..30ab45c1b 100644
--- a/mpfr/agm.c
+++ b/mpfr/agm.c
@@ -26,7 +26,8 @@ MA 02111-1307, USA. */
#include "mpfr-impl.h"
/* returns ceil(log(d)/log(2)) */
-long _mpfr_ceil_log2 (double d)
+long
+_mpfr_ceil_log2 (double d)
{
long exp;
union ieee_double_extract x;
@@ -39,7 +40,8 @@ long _mpfr_ceil_log2 (double d)
}
/* returns floor(log(d)/log(2)) */
-long _mpfr_floor_log2 (double d)
+long
+_mpfr_floor_log2 (double d)
{
union ieee_double_extract x;
@@ -48,7 +50,8 @@ long _mpfr_floor_log2 (double d)
}
/* returns y >= 2^d */
-double _mpfr_ceil_exp2 (double d)
+double
+_mpfr_ceil_exp2 (double d)
{
long exp;
union ieee_double_extract x;
diff --git a/mpfr/exp2.c b/mpfr/exp2.c
index d18926dc4..7756e4321 100644
--- a/mpfr/exp2.c
+++ b/mpfr/exp2.c
@@ -26,14 +26,15 @@ MA 02111-1307, USA. */
#include "mpfr.h"
#include "mpfr-impl.h"
-int mpfr_exp2_aux (mpz_t, mpfr_srcptr, int, int*);
-int mpfr_exp2_aux2 (mpz_t, mpfr_srcptr, int, int*);
-mp_exp_t mpz_normalize (mpz_t, mpz_t, int);
-int mpz_normalize2 (mpz_t, mpz_t, int, int);
-int mpfr_exp2 (mpfr_ptr, mpfr_srcptr, mp_rnd_t);
+int mpfr_exp2_aux _PROTO ((mpz_t, mpfr_srcptr, int, int*));
+int mpfr_exp2_aux2 _PROTO ((mpz_t, mpfr_srcptr, int, int*));
+mp_exp_t mpz_normalize _PROTO ((mpz_t, mpz_t, int));
+int mpz_normalize2 _PROTO ((mpz_t, mpz_t, int, int));
+int mpfr_exp2 _PROTO ((mpfr_ptr, mpfr_srcptr, mp_rnd_t));
/* returns floor(sqrt(n)) */
-unsigned long _mpfr_isqrt (unsigned long n)
+unsigned long
+_mpfr_isqrt (unsigned long n)
{
unsigned long s;
@@ -45,7 +46,8 @@ unsigned long _mpfr_isqrt (unsigned long n)
}
/* returns floor(n^(1/3)) */
-unsigned long _mpfr_cuberoot (unsigned long n)
+unsigned long
+_mpfr_cuberoot (unsigned long n)
{
double s, is;
diff --git a/mpfr/exp3.c b/mpfr/exp3.c
index 42819d5d8..175ef143d 100644
--- a/mpfr/exp3.c
+++ b/mpfr/exp3.c
@@ -27,8 +27,8 @@ MA 02111-1307, USA. */
/* #define DEBUG */
-int mpfr_exp_rational (mpfr_ptr, mpz_srcptr, int, int);
-int mpfr_exp3 (mpfr_ptr, mpfr_srcptr, mp_rnd_t);
+int mpfr_exp_rational _PROTO ((mpfr_ptr, mpz_srcptr, int, int));
+int mpfr_exp3 _PROTO ((mpfr_ptr, mpfr_srcptr, mp_rnd_t));
int
#if __STDC__
diff --git a/mpfr/generic.c b/mpfr/generic.c
index f44e5d1c7..cd3b257f7 100644
--- a/mpfr/generic.c
+++ b/mpfr/generic.c
@@ -20,14 +20,14 @@ the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
#ifndef GENERIC
-# error You should specify a name
+ # error You should specify a name
#endif
/* TODO: Reflechir a un traitement generique des infinis ? */
#ifdef B
# ifndef A
-# error B cannot be used without A
+ # error B cannot be used without A
# endif
#endif
diff --git a/mpfr/log2.c b/mpfr/log2.c
index 0c8688eac..70f4aabd0 100644
--- a/mpfr/log2.c
+++ b/mpfr/log2.c
@@ -30,8 +30,8 @@ mpfr_t __mpfr_const_log2; /* stored value of log(2) */
int __mpfr_const_log2_prec=0; /* precision of stored value */
mp_rnd_t __mpfr_const_log2_rnd; /* rounding mode of stored value */
-int mpfr_aux_log2 (mpfr_ptr, mpz_srcptr, int, int);
-int mpfr_const_aux_log2 (mpfr_ptr, mp_rnd_t);
+int mpfr_aux_log2 _PROTO ((mpfr_ptr, mpz_srcptr, int, int));
+int mpfr_const_aux_log2 _PROTO ((mpfr_ptr, mp_rnd_t));
#define A
#define A1 1
diff --git a/mpfr/pi.c b/mpfr/pi.c
index 54b0d3f84..fa72a5f8c 100644
--- a/mpfr/pi.c
+++ b/mpfr/pi.c
@@ -26,8 +26,8 @@ MA 02111-1307, USA. */
#include "mpfr.h"
#include "mpfr-impl.h"
-int mpfr_aux_pi (mpfr_ptr, mpz_srcptr, int, int);
-int mpfr_pi_machin3 (mpfr_ptr, mp_rnd_t);
+int mpfr_aux_pi _PROTO ((mpfr_ptr, mpz_srcptr, int, int));
+int mpfr_pi_machin3 _PROTO ((mpfr_ptr, mp_rnd_t));
#define A
#define A1 1
diff --git a/mpfr/print_raw.c b/mpfr/print_raw.c
index 69e682757..8d2e44212 100644
--- a/mpfr/print_raw.c
+++ b/mpfr/print_raw.c
@@ -26,7 +26,7 @@ MA 02111-1307, USA. */
#include "mpfr.h"
#include "mpfr-impl.h"
-void mpfr_get_str_raw (char *, mpfr_srcptr);
+void mpfr_get_str_raw _PROTO ((char *, mpfr_srcptr));
void
#if __STDC__
diff --git a/mpfr/set_d.c b/mpfr/set_d.c
index fe8006aae..3084e71cb 100644
--- a/mpfr/set_d.c
+++ b/mpfr/set_d.c
@@ -32,8 +32,8 @@ MA 02111-1307, USA. */
#define MPFR_LIMBS_PER_DOUBLE 1
#endif
-int __mpfr_extract_double (mp_ptr, double, int);
-double __mpfr_scale2 (double, int);
+int __mpfr_extract_double _PROTO ((mp_ptr, double, int));
+double __mpfr_scale2 _PROTO ((double, int));
#define NaN (0./0.) /* ensures a machine-independent NaN */
#define Infp (1/0.)
diff --git a/mpfr/sin_cos.c b/mpfr/sin_cos.c
index 21f746b70..fc71eb2f0 100644
--- a/mpfr/sin_cos.c
+++ b/mpfr/sin_cos.c
@@ -26,8 +26,8 @@ MA 02111-1307, USA. */
#include "mpfr.h"
#include "mpfr-impl.h"
-int mpfr_sin_aux (mpfr_ptr, mpz_srcptr, int, int);
-int mpfr_cos_aux (mpfr_ptr, mpz_srcptr, int, int);
+int mpfr_sin_aux _PROTO ((mpfr_ptr, mpz_srcptr, int, int));
+int mpfr_cos_aux _PROTO ((mpfr_ptr, mpz_srcptr, int, int));
#undef A
#undef B
diff --git a/mpfr/sub.c b/mpfr/sub.c
index 4971472de..9fda68d49 100644
--- a/mpfr/sub.c
+++ b/mpfr/sub.c
@@ -31,8 +31,8 @@ MA 02111-1307, USA. */
extern void mpfr_add1 _PROTO((mpfr_ptr, mpfr_srcptr, mpfr_srcptr,
mp_rnd_t, int));
-mp_limb_t mpn_sub_lshift_n (mp_limb_t *, mp_limb_t *, int, int, int);
-void mpfr_sub1 (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mp_rnd_t, int);
+mp_limb_t mpn_sub_lshift_n _PROTO ((mp_limb_t *, mp_limb_t *, int, int, int));
+void mpfr_sub1 _PROTO ((mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mp_rnd_t, int));
/* put in ap[0]..ap[an-1] the value of bp[0]..bp[n-1] shifted by sh bits
to the left minus ap[0]..ap[n-1], with 0 <= sh < BITS_PER_MP_LIMB, and