summaryrefslogtreecommitdiff
path: root/mpfr-test.h
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2002-01-12 01:27:53 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2002-01-12 01:27:53 +0000
commit4418c085eb0a49bf91ec61c02750ba0e5f371234 (patch)
tree241cd0a4d22855aea6e3978e0bca4bd8b3134033 /mpfr-test.h
parent374b9fa1ec9ccbfc7dc2026f3ff7c45ef7aaf6c7 (diff)
downloadmpfr-4418c085eb0a49bf91ec61c02750ba0e5f371234.tar.gz
Patches by Kevin Ryde for K&R compilers
and other fixes in prototypes. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1649 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'mpfr-test.h')
-rw-r--r--mpfr-test.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/mpfr-test.h b/mpfr-test.h
index bc49a7af5..fe7813e17 100644
--- a/mpfr-test.h
+++ b/mpfr-test.h
@@ -1,6 +1,6 @@
/* auxiliary functions for MPFR tests.
-Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -43,7 +43,8 @@ double Ulp _PROTO ((double));
/* generate a random double using the whole range of possible values,
including denormalized numbers, NaN, infinities, ... */
-double drand ()
+double
+drand (void)
{
double d; int *i, expo;
@@ -59,7 +60,8 @@ double drand ()
}
/* returns ulp(x) for x a 'normal' double-precision number */
-double Ulp (double x)
+double
+Ulp (double x)
{
double y, eps;
@@ -78,7 +80,8 @@ double Ulp (double x)
}
/* returns the number of ulp's between a and b */
-int ulp (double a, double b)
+int
+ulp (double a, double b)
{
if (a==0.0) {
if (b==0.0) return 0;
@@ -89,7 +92,8 @@ int ulp (double a, double b)
}
/* return double m*2^e */
-double dbl (double m, int e)
+double
+dbl (double m, int e)
{
if (e>=0) while (e-->0) m *= 2.0;
else while (e++<0) m /= 2.0;