summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorbjh21 <bjh21@NetBSD.org>2001-11-08 22:45:45 +0000
committerbjh21 <bjh21@NetBSD.org>2001-11-08 22:45:45 +0000
commit4da598993d42f71f2970da2fb93cd8672d9824ee (patch)
tree2527eb9528af41d38c4d3ae580cd4a423d8f4604 /lib
parent7723559395b99e325d7f54c763f59e673df788bc (diff)
Rename a parameter to fix build problem with new toolchain.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/arch/arm/gen/ldexp.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/lib/libc/arch/arm/gen/ldexp.c b/lib/libc/arch/arm/gen/ldexp.c
index e151a031db0..98ccbd3598d 100644
--- a/lib/libc/arch/arm/gen/ldexp.c
+++ b/lib/libc/arch/arm/gen/ldexp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ldexp.c,v 1.1 2000/12/29 20:13:50 bjh21 Exp $ */
+/* $NetBSD: ldexp.c,v 1.2 2001/11/08 22:45:45 bjh21 Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: ldexp.c,v 1.1 2000/12/29 20:13:50 bjh21 Exp $");
+__RCSID("$NetBSD: ldexp.c,v 1.2 2001/11/08 22:45:45 bjh21 Exp $");
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -47,12 +47,12 @@ __RCSID("$NetBSD: ldexp.c,v 1.1 2000/12/29 20:13:50 bjh21 Exp $");
#include <math.h>
/*
- * Multiply the given value by 2^exp.
+ * Multiply the given value by 2^exponent.
*/
double
-ldexp(val, exp)
+ldexp(val, expo)
double val;
- int exp;
+ int expo;
{
register int oldexp, newexp;
union {
@@ -74,17 +74,17 @@ ldexp(val, exp)
* u.v is denormal. We must adjust it so that the exponent
* arithmetic below will work.
*/
- if (exp <= DBL_EXP_BIAS) {
+ if (expo <= DBL_EXP_BIAS) {
/*
* Optimization: if the scaling can be done in a single
* multiply, or underflows, just do it now.
*/
- if (exp <= -DBL_FRACBITS) {
+ if (expo <= -DBL_FRACBITS) {
errno = ERANGE;
return (0.0);
}
mul.v = 0.0;
- mul.s.dbl_exp = exp + DBL_EXP_BIAS;
+ mul.s.dbl_exp = expo + DBL_EXP_BIAS;
u.v *= mul.v;
if (u.v == 0.0) {
errno = ERANGE;
@@ -93,14 +93,14 @@ ldexp(val, exp)
return (u.v);
} else {
/*
- * We know that exp is very large, and therefore the
+ * We know that expo is very large, and therefore the
* result cannot be denormal (though it may be Inf).
* Shift u.v by just enough to make it normal.
*/
mul.v = 0.0;
mul.s.dbl_exp = DBL_FRACBITS + DBL_EXP_BIAS;
u.v *= mul.v;
- exp -= DBL_FRACBITS;
+ expo -= DBL_FRACBITS;
oldexp = u.s.dbl_exp;
}
}
@@ -109,7 +109,7 @@ ldexp(val, exp)
* u.v is now normalized and oldexp has been adjusted if necessary.
* Calculate the new exponent and check for underflow and overflow.
*/
- newexp = oldexp + exp;
+ newexp = oldexp + expo;
if (newexp <= 0) {
/*
@@ -121,17 +121,17 @@ ldexp(val, exp)
return (0.0);
}
/*
- * Denormalize the result. We do this with a multiply. If exp
+ * Denormalize the result. We do this with a multiply. If expo
* is very large, it won't fit in a double, so we have to
* adjust the exponent first. This is safe because we know
* that u.v is normal at this point.
*/
- if (exp <= -DBL_EXP_BIAS) {
+ if (expo <= -DBL_EXP_BIAS) {
u.s.dbl_exp = 1;
- exp += oldexp - 1;
+ expo += oldexp - 1;
}
mul.v = 0.0;
- mul.s.dbl_exp = exp + DBL_EXP_BIAS;
+ mul.s.dbl_exp = expo + DBL_EXP_BIAS;
u.v *= mul.v;
return (u.v);
} else if (newexp >= DBL_EXP_INFNAN) {