summaryrefslogtreecommitdiff
path: root/lib/libm/src
diff options
context:
space:
mode:
authorjtc <jtc@NetBSD.org>1994-12-16 08:38:20 +0000
committerjtc <jtc@NetBSD.org>1994-12-16 08:38:20 +0000
commit600d3f84d508db4b1fcd8ab4d00624d33307b9e6 (patch)
treedd76af91c6d42c3d7d89d3b511ebb70163f02fb0 /lib/libm/src
parent8f4aafd39a17386830ac06591e83a7e996610c72 (diff)
Add volatile qualifier to huge and tiny, so that huge*huge and tiny*tiny
are performed at run-time.
Diffstat (limited to 'lib/libm/src')
-rw-r--r--lib/libm/src/e_coshf.c5
-rw-r--r--lib/libm/src/e_expf.c5
-rw-r--r--lib/libm/src/e_powf.c6
-rw-r--r--lib/libm/src/s_expm1f.c6
4 files changed, 12 insertions, 10 deletions
diff --git a/lib/libm/src/e_coshf.c b/lib/libm/src/e_coshf.c
index d228e077a35..6fcbaafaaf8 100644
--- a/lib/libm/src/e_coshf.c
+++ b/lib/libm/src/e_coshf.c
@@ -14,14 +14,15 @@
*/
#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$Id: e_coshf.c,v 1.3 1994/09/22 16:39:23 jtc Exp $";
+static char rcsid[] = "$Id: e_coshf.c,v 1.4 1994/12/16 08:38:20 jtc Exp $";
#endif
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
-static const float one = 1.0, half=0.5, huge = 1.0e30;
+static const volatile float huge = 1.0e30;
+static const float one = 1.0, half=0.5;
#else
static float one = 1.0, half=0.5, huge = 1.0e30;
#endif
diff --git a/lib/libm/src/e_expf.c b/lib/libm/src/e_expf.c
index 64d26d75fae..8ea148a6fd3 100644
--- a/lib/libm/src/e_expf.c
+++ b/lib/libm/src/e_expf.c
@@ -14,12 +14,14 @@
*/
#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$Id: e_expf.c,v 1.3 1994/09/22 16:39:27 jtc Exp $";
+static char rcsid[] = "$Id: e_expf.c,v 1.4 1994/12/16 08:38:22 jtc Exp $";
#endif
#include "math.h"
#include "math_private.h"
+static const volatile float huge = 1.0e+30;
+
#ifdef __STDC__
static const float
#else
@@ -27,7 +29,6 @@ static float
#endif
one = 1.0,
halF[2] = {0.5,-0.5,},
-huge = 1.0e+30,
twom100 = 7.8886090522e-31, /* 2**-100=0x0d800000 */
o_threshold= 8.8721679688e+01, /* 0x42b17180 */
u_threshold= -1.0397208405e+02, /* 0xc2cff1b5 */
diff --git a/lib/libm/src/e_powf.c b/lib/libm/src/e_powf.c
index 8bb0bca1c4c..dd51f37dca4 100644
--- a/lib/libm/src/e_powf.c
+++ b/lib/libm/src/e_powf.c
@@ -14,12 +14,14 @@
*/
#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$Id: e_powf.c,v 1.3 1994/09/22 16:40:00 jtc Exp $";
+static char rcsid[] = "$Id: e_powf.c,v 1.4 1994/12/16 08:38:24 jtc Exp $";
#endif
#include "math.h"
#include "math_private.h"
+static const volatile float huge = 1.0e+30, tiny = 1.0e-30;
+
#ifdef __STDC__
static const float
#else
@@ -32,8 +34,6 @@ zero = 0.0,
one = 1.0,
two = 2.0,
two24 = 16777216.0, /* 0x4b800000 */
-huge = 1.0e30,
-tiny = 1.0e-30,
/* poly coefs for (3/2)*(log(x)-2s-2/3*s**3 */
L1 = 6.0000002384e-01, /* 0x3f19999a */
L2 = 4.2857143283e-01, /* 0x3edb6db7 */
diff --git a/lib/libm/src/s_expm1f.c b/lib/libm/src/s_expm1f.c
index d6ce2020601..a4813a5d32e 100644
--- a/lib/libm/src/s_expm1f.c
+++ b/lib/libm/src/s_expm1f.c
@@ -14,20 +14,20 @@
*/
#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$Id: s_expm1f.c,v 1.3 1994/09/22 16:44:32 jtc Exp $";
+static char rcsid[] = "$Id: s_expm1f.c,v 1.4 1994/12/16 08:38:26 jtc Exp $";
#endif
#include "math.h"
#include "math_private.h"
+static const volatile float huge = 1.0e+30, tiny = 1.0e-30;
+
#ifdef __STDC__
static const float
#else
static float
#endif
one = 1.0,
-huge = 1.0e+30,
-tiny = 1.0e-30,
o_threshold = 8.8721679688e+01,/* 0x42b17180 */
ln2_hi = 6.9313812256e-01,/* 0x3f317180 */
ln2_lo = 9.0580006145e-06,/* 0x3717f7d1 */