Remove __STDC__ conditionals from libm.

This commit is contained in:
Joseph Myers 2012-01-27 17:27:55 +00:00
parent 43455e0916
commit 8db2188281
135 changed files with 271 additions and 1137 deletions

137
ChangeLog
View File

@ -1,3 +1,140 @@
2012-01-27 Joseph Myers <joseph@codesourcery.com>
* math/s_ldexp.c: Remove __STDC__ conditionals.
* math/s_ldexpf.c: Likewise.
* math/s_ldexpl.c: Likewise.
* math/s_nextafter.c: Likewise.
* math/s_nexttowardf.c: Likewise.
* math/s_significand.c: Likewise.
* math/s_significandf.c: Likewise.
* math/s_significandl.c: Likewise.
* math/w_jnl.c: Likewise.
* sysdeps/i386/fpu/s_isinfl.c: Likewise.
* sysdeps/i386/fpu/s_isnanl.c: Likewise.
* sysdeps/i386/fpu/s_nextafterl.c: Likewise.
* sysdeps/i386/fpu/s_nexttoward.c: Likewise.
* sysdeps/i386/fpu/s_nexttowardf.c: Likewise.
* sysdeps/ieee754/dbl-64/k_rem_pio2.c: Likewise.
* sysdeps/ieee754/dbl-64/k_tan.c: Likewise.
* sysdeps/ieee754/dbl-64/s_copysign.c: Likewise.
* sysdeps/ieee754/dbl-64/s_erf.c: Likewise.
* sysdeps/ieee754/dbl-64/s_fabs.c: Likewise.
* sysdeps/ieee754/dbl-64/s_finite.c: Likewise.
* sysdeps/ieee754/dbl-64/s_floor.c: Likewise.
* sysdeps/ieee754/dbl-64/s_frexp.c: Likewise.
* sysdeps/ieee754/dbl-64/s_ilogb.c: Likewise.
* sysdeps/ieee754/dbl-64/s_isnan.c: Likewise.
* sysdeps/ieee754/dbl-64/s_logb.c: Likewise.
* sysdeps/ieee754/dbl-64/s_nearbyint.c: Likewise.
* sysdeps/ieee754/dbl-64/s_tanh.c: Likewise.
* sysdeps/ieee754/dbl-64/wordsize-64/s_isnan.c: Likewise.
* sysdeps/ieee754/flt-32/e_acoshf.c: Likewise.
* sysdeps/ieee754/flt-32/e_asinf.c: Likewise.
* sysdeps/ieee754/flt-32/e_rem_pio2f.c: Likewise.
* sysdeps/ieee754/flt-32/k_cosf.c: Likewise.
* sysdeps/ieee754/flt-32/k_rem_pio2f.c: Likewise.
* sysdeps/ieee754/flt-32/k_sinf.c: Likewise.
* sysdeps/ieee754/flt-32/k_tanf.c: Likewise.
* sysdeps/ieee754/flt-32/s_atanf.c: Likewise.
* sysdeps/ieee754/flt-32/s_copysignf.c: Likewise.
* sysdeps/ieee754/flt-32/s_cosf.c: Likewise.
* sysdeps/ieee754/flt-32/s_erff.c: Likewise.
* sysdeps/ieee754/flt-32/s_fabsf.c: Likewise.
* sysdeps/ieee754/flt-32/s_finitef.c: Likewise.
* sysdeps/ieee754/flt-32/s_frexpf.c: Likewise.
* sysdeps/ieee754/flt-32/s_ilogbf.c: Likewise.
* sysdeps/ieee754/flt-32/s_isnanf.c: Likewise.
* sysdeps/ieee754/flt-32/s_logbf.c: Likewise.
* sysdeps/ieee754/flt-32/s_nextafterf.c: Likewise.
* sysdeps/ieee754/flt-32/s_sinf.c: Likewise.
* sysdeps/ieee754/flt-32/s_tanf.c: Likewise.
* sysdeps/ieee754/flt-32/s_tanhf.c: Likewise.
* sysdeps/ieee754/k_standard.c: Likewise.
* sysdeps/ieee754/ldbl-128/e_asinl.c: Likewise.
* sysdeps/ieee754/ldbl-128/k_tanl.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_asinhl.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_ceill.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_copysignl.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_cosl.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_erfl.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_fabsl.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_finitel.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_floorl.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_frexpl.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_ilogbl.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_isnanl.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_logbl.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_modfl.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_nearbyintl.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_nextafterl.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_nexttoward.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_nexttowardf.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_rintl.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_scalblnl.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_scalbnl.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_sinl.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_tanhl.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_tanl.c: Likewise.
* sysdeps/ieee754/ldbl-128/w_expl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/e_acosl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/e_asinl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/e_jnl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/k_tanl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_asinhl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_ceill.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_copysignl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_cosl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_erfl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_fabsl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_floorl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_frexpl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_ilogbl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_llrintl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_llroundl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_logbl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_lrintl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_lroundl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_modfl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_rintl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_roundl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_scalblnl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_scalbnl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_sinl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_tanhl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_tanl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_truncl.c: Likewise.
* sysdeps/ieee754/ldbl-96/e_asinl.c: Likewise.
* sysdeps/ieee754/ldbl-96/e_hypotl.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_asinhl.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_ceill.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_copysignl.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_cosl.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_erfl.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_fabsl.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_finitel.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_floorl.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_frexpl.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_ilogbl.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_isnanl.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_logbl.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_nearbyintl.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_nextafterl.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_nexttoward.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_nexttowardf.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_rintl.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_sinl.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_tanhl.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_tanl.c: Likewise.
* sysdeps/ieee754/s_matherr.c: Likewise.
* sysdeps/powerpc/fpu/w_sqrt.c: Likewise.
* sysdeps/powerpc/fpu/w_sqrtf.c: Likewise.
* sysdeps/powerpc/powerpc64/power4/fpu/w_sqrt.c: Likewise.
* sysdeps/powerpc/powerpc64/power4/fpu/w_sqrtf.c: Likewise.
2012-01-26 Joseph Myers <joseph@codesourcery.com>
* crypt/md5.h: Remove __STDC__ conditionals.

View File

@ -18,12 +18,7 @@ static char rcsid[] = "$NetBSD: s_ldexp.c,v 1.6 1995/05/10 20:47:40 jtc Exp $";
#include <math_private.h>
#include <errno.h>
#ifdef __STDC__
double __ldexp(double value, int exp)
#else
double __ldexp(value, exp)
double value; int exp;
#endif
double __ldexp(double value, int exp)
{
if(!__finite(value)||value==0.0) return value;
value = __scalbn(value,exp);

View File

@ -21,12 +21,7 @@ static char rcsid[] = "$NetBSD: s_ldexpf.c,v 1.3 1995/05/10 20:47:42 jtc Exp $";
#include <math_private.h>
#include <errno.h>
#ifdef __STDC__
float __ldexpf(float value, int exp)
#else
float __ldexpf(value, exp)
float value; int exp;
#endif
float __ldexpf(float value, int exp)
{
if(!__finitef(value)||value==(float)0.0) return value;
value = __scalbnf(value,exp);

View File

@ -22,12 +22,7 @@ static char rcsid[] = "$NetBSD: $";
#include <math_private.h>
#include <errno.h>
#ifdef __STDC__
long double __ldexpl(long double value, int exp)
#else
long double __ldexpl(value, exp)
long double value; int exp;
#endif
long double __ldexpl(long double value, int exp)
{
if(!__finitel(value)||value==0.0) return value;
value = __scalbnl(value,exp);

View File

@ -29,12 +29,7 @@ static char rcsid[] = "$NetBSD: s_nextafter.c,v 1.8 1995/05/10 20:47:58 jtc Exp
#include <math_private.h>
#include <float.h>
#ifdef __STDC__
double __nextafter(double x, double y)
#else
double __nextafter(x,y)
double x,y;
#endif
double __nextafter(double x, double y)
{
int32_t hx,hy,ix,iy;
u_int32_t lx,ly;

View File

@ -24,13 +24,7 @@
#include <math_private.h>
#include <float.h>
#ifdef __STDC__
float __nexttowardf(float x, long double y)
#else
float __nexttowardf(x,y)
float x;
long double y;
#endif
float __nexttowardf(float x, long double y)
{
int32_t hx,hy,ix,iy;
u_int32_t ly;

View File

@ -23,12 +23,7 @@ static char rcsid[] = "$NetBSD: s_significand.c,v 1.6 1995/05/10 20:48:11 jtc Ex
#include <math.h>
#include <math_private.h>
#ifdef __STDC__
double __significand(double x)
#else
double __significand(x)
double x;
#endif
double __significand(double x)
{
return __ieee754_scalb(x,(double) -__ilogb(x));
}

View File

@ -20,12 +20,7 @@ static char rcsid[] = "$NetBSD: s_significandf.c,v 1.3 1995/05/10 20:48:13 jtc E
#include <math.h>
#include <math_private.h>
#ifdef __STDC__
float __significandf(float x)
#else
float __significandf(x)
float x;
#endif
float __significandf(float x)
{
return __ieee754_scalbf(x,(float) -__ilogbf(x));
}

View File

@ -27,12 +27,7 @@ static char rcsid[] = "$NetBSD: $";
#include <math.h>
#include <math_private.h>
#ifdef __STDC__
long double __significandl(long double x)
#else
long double __significandl(x)
long double x;
#endif
long double __significandl(long double x)
{
return __ieee754_scalbl(x,(long double) -__ilogbl(x));
}

View File

@ -47,12 +47,7 @@ static char rcsid[] = "$NetBSD: $";
#include <math.h>
#include <math_private.h>
#ifdef __STDC__
long double __jnl(int n, long double x) /* wrapper jnl */
#else
long double __jnl(n,x) /* wrapper jnl */
long double x; int n;
#endif
long double __jnl(int n, long double x) /* wrapper jnl */
{
#ifdef _IEEE_LIBM
return __ieee754_jnl(n,x);
@ -68,12 +63,7 @@ static char rcsid[] = "$NetBSD: $";
}
weak_alias (__jnl, jnl)
#ifdef __STDC__
long double __ynl(int n, long double x) /* wrapper ynl */
#else
long double __ynl(n,x) /* wrapper ynl */
long double x; int n;
#endif
long double __ynl(int n, long double x) /* wrapper ynl */
{
#ifdef _IEEE_LIBM
return __ieee754_ynl(n,x);

View File

@ -17,12 +17,7 @@ static char rcsid[] = "$NetBSD: $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
int __isinfl(long double x)
#else
int __isinfl(x)
long double x;
#endif
int __isinfl(long double x)
{
int32_t se,hx,lx;
GET_LDOUBLE_WORDS(se,hx,lx,x);

View File

@ -26,12 +26,7 @@ static char rcsid[] = "$NetBSD: $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
int __isnanl(long double x)
#else
int __isnanl(x)
long double x;
#endif
int __isnanl(long double x)
{
int32_t se,hx,lx;
GET_LDOUBLE_WORDS(se,hx,lx,x);

View File

@ -29,12 +29,7 @@ static char rcsid[] = "$NetBSD: $";
#include "math.h"
#include <math_private.h>
#ifdef __STDC__
long double __nextafterl(long double x, long double y)
#else
long double __nextafterl(x,y)
long double x,y;
#endif
long double __nextafterl(long double x, long double y)
{
u_int32_t hx,hy,ix,iy;
u_int32_t lx,ly;

View File

@ -30,13 +30,7 @@ static char rcsid[] = "$NetBSD: $";
#include <math_private.h>
#include <float.h>
#ifdef __STDC__
double __nexttoward(double x, long double y)
#else
double __nexttoward(x,y)
double x;
long double y;
#endif
double __nexttoward(double x, long double y)
{
int32_t hx,ix,iy;
u_int32_t lx,hy,ly,esy;

View File

@ -22,13 +22,7 @@ static char rcsid[] = "$NetBSD: $";
#include <math_private.h>
#include <float.h>
#ifdef __STDC__
float __nexttowardf(float x, long double y)
#else
float __nexttowardf(x,y)
float x;
long double y;
#endif
float __nexttowardf(float x, long double y)
{
int32_t hx,ix,iy;
u_int32_t hy,ly,esy;

View File

@ -133,17 +133,9 @@ static char rcsid[] = "$NetBSD: k_rem_pio2.c,v 1.7 1995/05/10 20:46:25 jtc Exp $
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const int init_jk[] = {2,3,4,6}; /* initial value for jk */
#else
static int init_jk[] = {2,3,4,6};
#endif
#ifdef __STDC__
static const double PIo2[] = {
#else
static double PIo2[] = {
#endif
1.57079625129699707031e+00, /* 0x3FF921FB, 0x40000000 */
7.54978941586159635335e-08, /* 0x3E74442D, 0x00000000 */
5.39030252995776476554e-15, /* 0x3CF84698, 0x80000000 */
@ -154,22 +146,13 @@ static double PIo2[] = {
2.16741683877804819444e-51, /* 0x3569F31D, 0x00000000 */
};
#ifdef __STDC__
static const double
#else
static double
#endif
zero = 0.0,
one = 1.0,
two24 = 1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */
twon24 = 5.96046447753906250000e-08; /* 0x3E700000, 0x00000000 */
#ifdef __STDC__
int __kernel_rem_pio2(double *x, double *y, int e0, int nx, int prec, const int32_t *ipio2)
#else
int __kernel_rem_pio2(x,y,e0,nx,prec,ipio2)
double x[], y[]; int e0,nx,prec; int32_t ipio2[];
#endif
int __kernel_rem_pio2(double *x, double *y, int e0, int nx, int prec, const int32_t *ipio2)
{
int32_t jz,jx,jv,jp,jk,carry,n,iq[20],i,j,k,m,q0,ih;
double z,fw,f[20],fq[20],q[20];

View File

@ -53,11 +53,7 @@ static char rcsid[] = "$NetBSD: k_tan.c,v 1.8 1995/05/10 20:46:37 jtc Exp $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const double
#else
static double
#endif
one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
pio4 = 7.85398163397448278999e-01, /* 0x3FE921FB, 0x54442D18 */
pio4lo= 3.06161699786838301793e-17, /* 0x3C81A626, 0x33145C07 */
@ -77,12 +73,7 @@ T[] = {
2.59073051863633712884e-05, /* 0x3EFB2A70, 0x74BF7AD4 */
};
#ifdef __STDC__
double __kernel_tan(double x, double y, int iy)
#else
double __kernel_tan(x, y, iy)
double x,y; int iy;
#endif
double __kernel_tan(double x, double y, int iy)
{
double z,r,v,w,s,r1,r2,r3,v1,v2,v3,w2,w4;
int32_t ix,hx;

View File

@ -23,12 +23,7 @@ static char rcsid[] = "$NetBSD: s_copysign.c,v 1.8 1995/05/10 20:46:57 jtc Exp $
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
double __copysign(double x, double y)
#else
double __copysign(x,y)
double x,y;
#endif
double __copysign(double x, double y)
{
u_int32_t hx,hy;
GET_HIGH_WORD(hx,x);

View File

@ -115,11 +115,7 @@ static char rcsid[] = "$NetBSD: s_erf.c,v 1.8 1995/05/10 20:47:05 jtc Exp $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const double
#else
static double
#endif
tiny = 1e-300,
half= 5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */
one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
@ -194,12 +190,7 @@ sb[] = {0.0,3.03380607434824582924e+01, /* 0x403E568B, 0x261D5190 */
4.74528541206955367215e+02, /* 0x407DA874, 0xE79FE763 */
-2.24409524465858183362e+01}; /* 0xC03670E2, 0x42712D62 */
#ifdef __STDC__
double __erf(double x)
#else
double __erf(x)
double x;
#endif
double __erf(double x)
{
int32_t hx,ix,i;
double R,S,P,Q,s,y,z,r;
@ -307,12 +298,7 @@ strong_alias (__erf, __erfl)
weak_alias (__erf, erfl)
#endif
#ifdef __STDC__
double __erfc(double x)
#else
double __erfc(x)
double x;
#endif
double __erfc(double x)
{
int32_t hx,ix;
double R,S,P,Q,s,y,z,r;

View File

@ -21,12 +21,7 @@ static char rcsid[] = "$NetBSD: s_fabs.c,v 1.7 1995/05/10 20:47:13 jtc Exp $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
double __fabs(double x)
#else
double __fabs(x)
double x;
#endif
double __fabs(double x)
{
u_int32_t high;
GET_HIGH_WORD(high,x);

View File

@ -23,12 +23,7 @@ static char rcsid[] = "$NetBSD: s_finite.c,v 1.8 1995/05/10 20:47:17 jtc Exp $";
#include "math_private.h"
#undef __finite
#ifdef __STDC__
int __finite(double x)
#else
int __finite(x)
double x;
#endif
int __finite(double x)
{
int32_t hx;
GET_HIGH_WORD(hx,x);

View File

@ -22,18 +22,9 @@
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const double huge = 1.0e300;
#else
static double huge = 1.0e300;
#endif
#ifdef __STDC__
double __floor(double x)
#else
double __floor(x)
double x;
#endif
double __floor(double x)
{
int32_t i0,i1,j0;
u_int32_t i,j;

View File

@ -27,19 +27,10 @@ static char rcsid[] = "$NetBSD: s_frexp.c,v 1.9 1995/05/10 20:47:24 jtc Exp $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const double
#else
static double
#endif
two54 = 1.80143985094819840000e+16; /* 0x43500000, 0x00000000 */
#ifdef __STDC__
double __frexp(double x, int *eptr)
#else
double __frexp(x, eptr)
double x; int *eptr;
#endif
double __frexp(double x, int *eptr)
{
int32_t hx, ix, lx;
EXTRACT_WORDS(hx,lx,x);

View File

@ -25,12 +25,7 @@ static char rcsid[] = "$NetBSD: s_ilogb.c,v 1.9 1995/05/10 20:47:28 jtc Exp $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
int __ilogb(double x)
#else
int __ilogb(x)
double x;
#endif
int __ilogb(double x)
{
int32_t hx,lx,ix;

View File

@ -23,12 +23,7 @@ static char rcsid[] = "$NetBSD: s_isnan.c,v 1.8 1995/05/10 20:47:36 jtc Exp $";
#include "math_private.h"
#undef __isnan
#ifdef __STDC__
int __isnan(double x)
#else
int __isnan(x)
double x;
#endif
int __isnan(double x)
{
int32_t hx,lx;
EXTRACT_WORDS(hx,lx,x);

View File

@ -23,12 +23,7 @@ static char rcsid[] = "$NetBSD: s_logb.c,v 1.8 1995/05/10 20:47:50 jtc Exp $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
double __logb(double x)
#else
double __logb(x)
double x;
#endif
double __logb(double x)
{
int32_t lx,ix;
EXTRACT_WORDS(ix,lx,x);

View File

@ -28,22 +28,13 @@ static char rcsid[] = "$NetBSD: s_rint.c,v 1.8 1995/05/10 20:48:04 jtc Exp $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const double
#else
static double
#endif
TWO52[2]={
4.50359962737049600000e+15, /* 0x43300000, 0x00000000 */
-4.50359962737049600000e+15, /* 0xC3300000, 0x00000000 */
};
#ifdef __STDC__
double __nearbyint(double x)
#else
double __nearbyint(x)
double x;
#endif
double __nearbyint(double x)
{
fenv_t env;
int32_t i0,j0,sx;

View File

@ -41,18 +41,9 @@ static char rcsid[] = "$NetBSD: s_tanh.c,v 1.7 1995/05/10 20:48:22 jtc Exp $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const double one=1.0, two=2.0, tiny = 1.0e-300;
#else
static double one=1.0, two=2.0, tiny = 1.0e-300;
#endif
#ifdef __STDC__
double __tanh(double x)
#else
double __tanh(x)
double x;
#endif
double __tanh(double x)
{
double t,z;
int32_t jx,ix,lx;

View File

@ -19,12 +19,7 @@
#include "math_private.h"
#undef __isnan
#ifdef __STDC__
int __isnan(double x)
#else
int __isnan(x)
double x;
#endif
int __isnan(double x)
{
int64_t hx;
EXTRACT_WORDS64(hx,x);

View File

@ -20,20 +20,11 @@ static char rcsid[] = "$NetBSD: e_acoshf.c,v 1.5 1995/05/12 04:57:20 jtc Exp $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const float
#else
static float
#endif
one = 1.0,
ln2 = 6.9314718246e-01; /* 0x3f317218 */
#ifdef __STDC__
float __ieee754_acoshf(float x)
#else
float __ieee754_acoshf(x)
float x;
#endif
float __ieee754_acoshf(float x)
{
float t;
int32_t hx;

View File

@ -42,11 +42,7 @@ static char rcsid[] = "$NetBSD: e_asinf.c,v 1.5 1995/05/12 04:57:25 jtc Exp $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const float
#else
static float
#endif
one = 1.0000000000e+00, /* 0x3F800000 */
huge = 1.000e+30,
@ -63,12 +59,7 @@ p2 = 4.547037598e-2f,
p3 = 2.417951451e-2f,
p4 = 4.216630880e-2f;
#ifdef __STDC__
float __ieee754_asinf(float x)
#else
float __ieee754_asinf(x)
float x;
#endif
float __ieee754_asinf(float x)
{
float t,w,p,q,c,r,s;
int32_t hx,ix;

View File

@ -29,11 +29,7 @@ static char rcsid[] = "$NetBSD: e_rem_pio2f.c,v 1.5 1995/05/10 20:46:03 jtc Exp
/*
* Table of constants for 2/pi, 396 Hex digits (476 decimal) of 2/pi
*/
#ifdef __STDC__
static const int32_t two_over_pi[] = {
#else
static int32_t two_over_pi[] = {
#endif
0xA2, 0xF9, 0x83, 0x6E, 0x4E, 0x44, 0x15, 0x29, 0xFC,
0x27, 0x57, 0xD1, 0xF5, 0x34, 0xDD, 0xC0, 0xDB, 0x62,
0x95, 0x99, 0x3C, 0x43, 0x90, 0x41, 0xFE, 0x51, 0x63,
@ -60,11 +56,7 @@ static int32_t two_over_pi[] = {
/* This array is like the one in e_rem_pio2.c, but the numbers are
single precision and the last 8 bits are forced to 0. */
#ifdef __STDC__
static const int32_t npio2_hw[] = {
#else
static int32_t npio2_hw[] = {
#endif
0x3fc90f00, 0x40490f00, 0x4096cb00, 0x40c90f00, 0x40fb5300, 0x4116cb00,
0x412fed00, 0x41490f00, 0x41623100, 0x417b5300, 0x418a3a00, 0x4196cb00,
0x41a35c00, 0x41afed00, 0x41bc7e00, 0x41c90f00, 0x41d5a000, 0x41e23100,
@ -83,11 +75,7 @@ static int32_t npio2_hw[] = {
* pio2_3t: pi/2 - (pio2_1+pio2_2+pio2_3)
*/
#ifdef __STDC__
static const float
#else
static float
#endif
zero = 0.0000000000e+00, /* 0x00000000 */
half = 5.0000000000e-01, /* 0x3f000000 */
two8 = 2.5600000000e+02, /* 0x43800000 */
@ -99,12 +87,7 @@ pio2_2t = 6.0770999344e-11, /* 0x2e85a308 */
pio2_3 = 6.0770943833e-11, /* 0x2e85a300 */
pio2_3t = 6.1232342629e-17; /* 0x248d3132 */
#ifdef __STDC__
int32_t __ieee754_rem_pio2f(float x, float *y)
#else
int32_t __ieee754_rem_pio2f(x,y)
float x,y[];
#endif
int32_t __ieee754_rem_pio2f(float x, float *y)
{
float z,w,t,r,fn;
float tx[3];

View File

@ -20,11 +20,7 @@ static char rcsid[] = "$NetBSD: k_cosf.c,v 1.4 1995/05/10 20:46:23 jtc Exp $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const float
#else
static float
#endif
one = 1.0000000000e+00, /* 0x3f800000 */
C1 = 4.1666667908e-02, /* 0x3d2aaaab */
C2 = -1.3888889225e-03, /* 0xbab60b61 */
@ -33,12 +29,7 @@ C4 = -2.7557314297e-07, /* 0xb493f27c */
C5 = 2.0875723372e-09, /* 0x310f74f6 */
C6 = -1.1359647598e-11; /* 0xad47d74e */
#ifdef __STDC__
float __kernel_cosf(float x, float y)
#else
float __kernel_cosf(x, y)
float x,y;
#endif
float __kernel_cosf(float x, float y)
{
float a,hz,z,r,qx;
int32_t ix;

View File

@ -23,17 +23,9 @@ static char rcsid[] = "$NetBSD: k_rem_pio2f.c,v 1.4 1995/05/10 20:46:28 jtc Exp
/* In the float version, the input parameter x contains 8 bit
integers, not 24 bit integers. 113 bit precision is not supported. */
#ifdef __STDC__
static const int init_jk[] = {4,7,9}; /* initial value for jk */
#else
static int init_jk[] = {4,7,9};
#endif
#ifdef __STDC__
static const float PIo2[] = {
#else
static float PIo2[] = {
#endif
1.5703125000e+00, /* 0x3fc90000 */
4.5776367188e-04, /* 0x39f00000 */
2.5987625122e-05, /* 0x37da0000 */
@ -47,22 +39,13 @@ static float PIo2[] = {
6.3331015649e-25, /* 0x17440000 */
};
#ifdef __STDC__
static const float
#else
static float
#endif
zero = 0.0,
one = 1.0,
two8 = 2.5600000000e+02, /* 0x43800000 */
twon8 = 3.9062500000e-03; /* 0x3b800000 */
#ifdef __STDC__
int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const int32_t *ipio2)
#else
int __kernel_rem_pio2f(x,y,e0,nx,prec,ipio2)
float x[], y[]; int e0,nx,prec; int32_t ipio2[];
#endif
int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const int32_t *ipio2)
{
int32_t jz,jx,jv,jp,jk,carry,n,iq[20],i,j,k,m,q0,ih;
float z,fw,f[20],fq[20],q[20];

View File

@ -20,11 +20,7 @@ static char rcsid[] = "$NetBSD: k_sinf.c,v 1.4 1995/05/10 20:46:33 jtc Exp $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const float
#else
static float
#endif
half = 5.0000000000e-01,/* 0x3f000000 */
S1 = -1.6666667163e-01, /* 0xbe2aaaab */
S2 = 8.3333337680e-03, /* 0x3c088889 */
@ -33,12 +29,7 @@ S4 = 2.7557314297e-06, /* 0x3638ef1b */
S5 = -2.5050759689e-08, /* 0xb2d72f34 */
S6 = 1.5896910177e-10; /* 0x2f2ec9d3 */
#ifdef __STDC__
float __kernel_sinf(float x, float y, int iy)
#else
float __kernel_sinf(x, y, iy)
float x,y; int iy; /* iy=0 if y is zero */
#endif
float __kernel_sinf(float x, float y, int iy)
{
float z,r,v;
int32_t ix;

View File

@ -19,11 +19,7 @@ static char rcsid[] = "$NetBSD: k_tanf.c,v 1.4 1995/05/10 20:46:39 jtc Exp $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const float
#else
static float
#endif
one = 1.0000000000e+00, /* 0x3f800000 */
pio4 = 7.8539812565e-01, /* 0x3f490fda */
pio4lo= 3.7748947079e-08, /* 0x33222168 */
@ -43,12 +39,7 @@ T[] = {
2.5907305826e-05, /* 0x37d95384 */
};
#ifdef __STDC__
float __kernel_tanf(float x, float y, int iy)
#else
float __kernel_tanf(x, y, iy)
float x,y; int iy;
#endif
float __kernel_tanf(float x, float y, int iy)
{
float z,r,v,w,s;
int32_t ix,hx;

View File

@ -20,33 +20,21 @@ static char rcsid[] = "$NetBSD: s_atanf.c,v 1.4 1995/05/10 20:46:47 jtc Exp $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const float atanhi[] = {
#else
static float atanhi[] = {
#endif
4.6364760399e-01, /* atan(0.5)hi 0x3eed6338 */
7.8539812565e-01, /* atan(1.0)hi 0x3f490fda */
9.8279368877e-01, /* atan(1.5)hi 0x3f7b985e */
1.5707962513e+00, /* atan(inf)hi 0x3fc90fda */
};
#ifdef __STDC__
static const float atanlo[] = {
#else
static float atanlo[] = {
#endif
5.0121582440e-09, /* atan(0.5)lo 0x31ac3769 */
3.7748947079e-08, /* atan(1.0)lo 0x33222168 */
3.4473217170e-08, /* atan(1.5)lo 0x33140fb4 */
7.5497894159e-08, /* atan(inf)lo 0x33a22168 */
};
#ifdef __STDC__
static const float aT[] = {
#else
static float aT[] = {
#endif
3.3333334327e-01, /* 0x3eaaaaaa */
-2.0000000298e-01, /* 0xbe4ccccd */
1.4285714924e-01, /* 0x3e124925 */
@ -60,20 +48,11 @@ static float aT[] = {
1.6285819933e-02, /* 0x3c8569d7 */
};
#ifdef __STDC__
static const float
#else
static float
#endif
static const float
one = 1.0,
huge = 1.0e30;
#ifdef __STDC__
float __atanf(float x)
#else
float __atanf(x)
float x;
#endif
float __atanf(float x)
{
float w,s1,s2,z;
int32_t ix,hx,id;

View File

@ -26,12 +26,7 @@ static char rcsid[] = "$NetBSD: s_copysignf.c,v 1.4 1995/05/10 20:46:59 jtc Exp
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
float __copysignf(float x, float y)
#else
float __copysignf(x,y)
float x,y;
#endif
float __copysignf(float x, float y)
{
u_int32_t ix,iy;
GET_FLOAT_WORD(ix,x);

View File

@ -21,18 +21,9 @@ static char rcsid[] = "$NetBSD: s_cosf.c,v 1.4 1995/05/10 20:47:03 jtc Exp $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const float one=1.0;
#else
static float one=1.0;
#endif
#ifdef __STDC__
float __cosf(float x)
#else
float __cosf(x)
float x;
#endif
float __cosf(float x)
{
float y[2],z=0.0;
int32_t n,ix;

View File

@ -20,11 +20,7 @@ static char rcsid[] = "$NetBSD: s_erff.c,v 1.4 1995/05/10 20:47:07 jtc Exp $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const float
#else
static float
#endif
tiny = 1e-30,
half= 5.0000000000e-01, /* 0x3F000000 */
one = 1.0000000000e+00, /* 0x3F800000 */
@ -99,12 +95,7 @@ sb5 = 2.5530502930e+03, /* 0x451f90ce */
sb6 = 4.7452853394e+02, /* 0x43ed43a7 */
sb7 = -2.2440952301e+01; /* 0xc1b38712 */
#ifdef __STDC__
float __erff(float x)
#else
float __erff(x)
float x;
#endif
float __erff(float x)
{
int32_t hx,ix,i;
float R,S,P,Q,s,y,z,r;
@ -157,12 +148,7 @@ sb7 = -2.2440952301e+01; /* 0xc1b38712 */
}
weak_alias (__erff, erff)
#ifdef __STDC__
float __erfcf(float x)
#else
float __erfcf(x)
float x;
#endif
float __erfcf(float x)
{
int32_t hx,ix;
float R,S,P,Q,s,y,z,r;

View File

@ -24,12 +24,7 @@ static char rcsid[] = "$NetBSD: s_fabsf.c,v 1.4 1995/05/10 20:47:15 jtc Exp $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
float __fabsf(float x)
#else
float __fabsf(x)
float x;
#endif
float __fabsf(float x)
{
u_int32_t ix;
GET_FLOAT_WORD(ix,x);

View File

@ -26,12 +26,7 @@ static char rcsid[] = "$NetBSD: s_finitef.c,v 1.4 1995/05/10 20:47:18 jtc Exp $"
#include "math_private.h"
#undef __finitef
#ifdef __STDC__
int __finitef(float x)
#else
int __finitef(x)
float x;
#endif
int __finitef(float x)
{
int32_t ix;
GET_FLOAT_WORD(ix,x);

View File

@ -20,19 +20,10 @@ static char rcsid[] = "$NetBSD: s_frexpf.c,v 1.5 1995/05/10 20:47:26 jtc Exp $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const float
#else
static float
#endif
two25 = 3.3554432000e+07; /* 0x4c000000 */
#ifdef __STDC__
float __frexpf(float x, int *eptr)
#else
float __frexpf(x, eptr)
float x; int *eptr;
#endif
float __frexpf(float x, int *eptr)
{
int32_t hx,ix;
GET_FLOAT_WORD(hx,x);

View File

@ -21,12 +21,7 @@ static char rcsid[] = "$NetBSD: s_ilogbf.c,v 1.4 1995/05/10 20:47:31 jtc Exp $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
int __ilogbf(float x)
#else
int __ilogbf(x)
float x;
#endif
int __ilogbf(float x)
{
int32_t hx,ix;

View File

@ -26,12 +26,7 @@ static char rcsid[] = "$NetBSD: s_isnanf.c,v 1.4 1995/05/10 20:47:38 jtc Exp $";
#include "math_private.h"
#undef __isnanf
#ifdef __STDC__
int __isnanf(float x)
#else
int __isnanf(x)
float x;
#endif
int __isnanf(float x)
{
int32_t ix;
GET_FLOAT_WORD(ix,x);

View File

@ -20,12 +20,7 @@ static char rcsid[] = "$NetBSD: s_logbf.c,v 1.4 1995/05/10 20:47:51 jtc Exp $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
float __logbf(float x)
#else
float __logbf(x)
float x;
#endif
float __logbf(float x)
{
int32_t ix;
GET_FLOAT_WORD(ix,x);

View File

@ -21,12 +21,7 @@ static char rcsid[] = "$NetBSD: s_nextafterf.c,v 1.4 1995/05/10 20:48:01 jtc Exp
#include <math_private.h>
#include <float.h>
#ifdef __STDC__
float __nextafterf(float x, float y)
#else
float __nextafterf(x,y)
float x,y;
#endif
float __nextafterf(float x, float y)
{
int32_t hx,hy,ix,iy;

View File

@ -21,12 +21,7 @@ static char rcsid[] = "$NetBSD: s_sinf.c,v 1.4 1995/05/10 20:48:16 jtc Exp $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
float __sinf(float x)
#else
float __sinf(x)
float x;
#endif
float __sinf(float x)
{
float y[2],z=0.0;
int32_t n, ix;

View File

@ -21,12 +21,7 @@ static char rcsid[] = "$NetBSD: s_tanf.c,v 1.4 1995/05/10 20:48:20 jtc Exp $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
float __tanf(float x)
#else
float __tanf(x)
float x;
#endif
float __tanf(float x)
{
float y[2],z=0.0;
int32_t n, ix;

View File

@ -20,18 +20,9 @@ static char rcsid[] = "$NetBSD: s_tanhf.c,v 1.4 1995/05/10 20:48:24 jtc Exp $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const float one=1.0, two=2.0, tiny = 1.0e-30;
#else
static float one=1.0, two=2.0, tiny = 1.0e-30;
#endif
#ifdef __STDC__
float __tanhf(float x)
#else
float __tanhf(x)
float x;
#endif
float __tanhf(float x)
{
float t,z;
int32_t jx,ix;

View File

@ -32,7 +32,7 @@ static char rcsid[] = "$NetBSD: k_standard.c,v 1.6 1995/05/10 20:46:35 jtc Exp $
/* XXX gcc versions until now don't delay the 0.0/0.0 division until
runtime but produce NaN at copile time. This is wrong since the
exceptions are not set correctly. */
#if 0 && defined __STDC__
#if 0
static const double zero = 0.0; /* used as const */
#else
static double zero = 0.0; /* used as const */

View File

@ -63,11 +63,7 @@
#include "math_private.h"
long double sqrtl (long double);
#ifdef __STDC__
static const long double
#else
static long double
#endif
one = 1.0L,
huge = 1.0e+4932L,
pio2_hi = 1.5707963267948966192313216916397514420986L,
@ -132,14 +128,8 @@ static long double
#ifdef __STDC__
long double
__ieee754_asinl (long double x)
#else
double
__ieee754_asinl (x)
long double x;
#endif
{
long double t, w, p, q, c, r, s;
int32_t ix, sign, flag;

View File

@ -58,11 +58,7 @@
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const long double
#else
static long double
#endif
one = 1.0L,
pio4hi = 7.8539816339744830961566084581987569936977E-1L,
pio4lo = 2.1679525325309452561992610065108379921906E-35L,
@ -85,15 +81,8 @@ static long double
/* 1.000000000000000000000000000000000000000E0 */
#ifdef __STDC__
long double
__kernel_tanl (long double x, long double y, int iy)
#else
long double
__kernel_tanl (x, y, iy)
long double x, y;
int iy;
#endif
{
long double z, r, v, w, s;
int32_t ix, sign;

View File

@ -32,23 +32,13 @@ static char rcsid[] = "$NetBSD: $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const long double
#else
static long double
#endif
one = 1.0L,
ln2 = 6.931471805599453094172321214581765681e-1L,
huge = 1.0e+4900L;
#ifdef __STDC__
long double
__asinhl (long double x)
#else
long double
__asinhl (x)
long double x;
#endif
{
long double t, w;
int32_t ix, sign;

View File

@ -29,18 +29,9 @@ static char rcsid[] = "$NetBSD: $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const long double huge = 1.0e4930L;
#else
static long double huge = 1.0e4930L;
#endif
#ifdef __STDC__
long double __ceill(long double x)
#else
long double __ceill(x)
long double x;
#endif
long double __ceill(long double x)
{
int64_t i0,i1,j0;
u_int64_t i,j;

View File

@ -26,12 +26,7 @@ static char rcsid[] = "$NetBSD: $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
long double __copysignl(long double x, long double y)
#else
long double __copysignl(x,y)
long double x,y;
#endif
long double __copysignl(long double x, long double y)
{
u_int64_t hx,hy;
GET_LDOUBLE_MSW64(hx,x);

View File

@ -48,12 +48,7 @@
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
long double __cosl(long double x)
#else
long double __cosl(x)
long double x;
#endif
long double __cosl(long double x)
{
long double y[2],z=0.0L;
int64_t n, ix;

View File

@ -136,11 +136,7 @@ deval (long double x, const long double *p, int n)
#ifdef __STDC__
static const long double
#else
static long double
#endif
tiny = 1e-4931L,
half = 0.5L,
one = 1.0L,
@ -754,14 +750,8 @@ static const long double RDr1[NRDr1 + 1] =
};
#ifdef __STDC__
long double
__erfl (long double x)
#else
double
__erfl (x)
long double x;
#endif
{
long double a, y, z;
int32_t i, ix, sign;
@ -808,15 +798,8 @@ __erfl (x)
}
weak_alias (__erfl, erfl)
#ifdef __STDC__
long double
__erfcl (long double x)
#else
long double
__erfcl (x)
double
x;
#endif
long double
__erfcl (long double x)
{
long double y, z, p, r;
int32_t i, ix, sign;

View File

@ -24,12 +24,7 @@ static char rcsid[] = "$NetBSD: $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
long double __fabsl(long double x)
#else
long double __fabsl(x)
long double x;
#endif
long double __fabsl(long double x)
{
u_int64_t hx;
GET_LDOUBLE_MSW64(hx,x);

View File

@ -25,12 +25,7 @@ static char rcsid[] = "$NetBSD: $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
int __finitel(long double x)
#else
int __finitel(x)
long double x;
#endif
int __finitel(long double x)
{
int64_t hx;
GET_LDOUBLE_MSW64(hx,x);

View File

@ -29,18 +29,9 @@ static char rcsid[] = "$NetBSD: $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const long double huge = 1.0e4930L;
#else
static long double huge = 1.0e4930L;
#endif
#ifdef __STDC__
long double __floorl(long double x)
#else
long double __floorl(x)
long double x;
#endif
long double __floorl(long double x)
{
int64_t i0,i1,j0;
u_int64_t i,j;

View File

@ -30,19 +30,10 @@ static char rcsid[] = "$NetBSD: $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const long double
#else
static long double
#endif
two114 = 2.0769187434139310514121985316880384E+34L; /* 0x4071000000000000, 0 */
#ifdef __STDC__
long double __frexpl(long double x, int *eptr)
#else
long double __frexpl(x, eptr)
long double x; int *eptr;
#endif
long double __frexpl(long double x, int *eptr)
{
u_int64_t hx, lx, ix;
GET_LDOUBLE_WORDS64(hx,lx,x);

View File

@ -28,12 +28,7 @@ static char rcsid[] = "$NetBSD: $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
int __ilogbl(long double x)
#else
int __ilogbl(x)
long double x;
#endif
int __ilogbl(long double x)
{
int64_t hx,lx;
int ix;

View File

@ -25,12 +25,7 @@ static char rcsid[] = "$NetBSD: $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
int __isnanl(long double x)
#else
int __isnanl(x)
long double x;
#endif
int __isnanl(long double x)
{
int64_t hx,lx;
GET_LDOUBLE_WORDS64(hx,lx,x);

View File

@ -26,12 +26,7 @@ static char rcsid[] = "$NetBSD: $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
long double __logbl(long double x)
#else
long double __logbl(x)
long double x;
#endif
long double __logbl(long double x)
{
int64_t lx,hx;
GET_LDOUBLE_WORDS64(hx,lx,x);

View File

@ -30,18 +30,9 @@ static char rcsid[] = "$NetBSD: $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const long double one = 1.0;
#else
static long double one = 1.0;
#endif
#ifdef __STDC__
long double __modfl(long double x, long double *iptr)
#else
long double __modfl(x, iptr)
long double x,*iptr;
#endif
long double __modfl(long double x, long double *iptr)
{
int64_t i0,i1,j0;
u_int64_t i;

View File

@ -27,22 +27,13 @@
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const long double
#else
static long double
#endif
TWO112[2]={
5.19229685853482762853049632922009600E+33L, /* 0x406F000000000000, 0 */
-5.19229685853482762853049632922009600E+33L /* 0xC06F000000000000, 0 */
};
#ifdef __STDC__
long double __nearbyintl(long double x)
#else
long double __nearbyintl(x)
long double x;
#endif
long double __nearbyintl(long double x)
{
fenv_t env;
int64_t i0,j0,sx;

View File

@ -27,12 +27,7 @@ static char rcsid[] = "$NetBSD: $";
#include "math.h"
#include <math_private.h>
#ifdef __STDC__
long double __nextafterl(long double x, long double y)
#else
long double __nextafterl(x,y)
long double x,y;
#endif
long double __nextafterl(long double x, long double y)
{
int64_t hx,hy,ix,iy;
u_int64_t lx,ly;

View File

@ -29,13 +29,7 @@ static char rcsid[] = "$NetBSD: $";
#include <math_private.h>
#include <float.h>
#ifdef __STDC__
double __nexttoward(double x, long double y)
#else
double __nexttoward(x,y)
double x;
long double y;
#endif
double __nexttoward(double x, long double y)
{
int32_t hx,ix;
int64_t hy,iy;

View File

@ -21,13 +21,7 @@ static char rcsid[] = "$NetBSD: $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
float __nexttowardf(float x, long double y)
#else
float __nexttowardf(x,y)
float x;
long double y;
#endif
float __nexttowardf(float x, long double y)
{
int32_t hx,ix;
int64_t hy,iy;

View File

@ -30,22 +30,13 @@ static char rcsid[] = "$NetBSD: $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const long double
#else
static long double
#endif
TWO112[2]={
5.19229685853482762853049632922009600E+33L, /* 0x406F000000000000, 0 */
-5.19229685853482762853049632922009600E+33L /* 0xC06F000000000000, 0 */
};
#ifdef __STDC__
long double __rintl(long double x)
#else
long double __rintl(x)
long double x;
#endif
long double __rintl(long double x)
{
int64_t i0,j0,sx;
u_int64_t i,i1;

View File

@ -28,22 +28,13 @@ static char rcsid[] = "$NetBSD: $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const long double
#else
static long double
#endif
two114 = 2.0769187434139310514121985316880384E+34L, /* 0x4071000000000000, 0 */
twom114 = 4.8148248609680896326399448564623183E-35L, /* 0x3F8D000000000000, 0 */
huge = 1.0E+4900L,
tiny = 1.0E-4900L;
#ifdef __STDC__
long double __scalblnl (long double x, long int n)
#else
long double __scalblnl (x,n)
long double x; long int n;
#endif
long double __scalblnl (long double x, long int n)
{
int64_t k,hx,lx;
GET_LDOUBLE_WORDS64(hx,lx,x);

View File

@ -28,22 +28,13 @@ static char rcsid[] = "$NetBSD: $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const long double
#else
static long double
#endif
two114 = 2.0769187434139310514121985316880384E+34L, /* 0x4071000000000000, 0 */
twom114 = 4.8148248609680896326399448564623183E-35L, /* 0x3F8D000000000000, 0 */
huge = 1.0E+4900L,
tiny = 1.0E-4900L;
#ifdef __STDC__
long double __scalbnl (long double x, int n)
#else
long double __scalbnl (x,n)
long double x; int n;
#endif
long double __scalbnl (long double x, int n)
{
int64_t k,hx,lx;
GET_LDOUBLE_WORDS64(hx,lx,x);

View File

@ -48,12 +48,7 @@
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
long double __sinl(long double x)
#else
long double __sinl(x)
long double x;
#endif
long double __sinl(long double x)
{
long double y[2],z=0.0L;
int64_t n, ix;

View File

@ -44,20 +44,10 @@
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const long double one = 1.0, two = 2.0, tiny = 1.0e-4900L;
#else
static long double one = 1.0, two = 2.0, tiny = 1.0e-4900L;
#endif
#ifdef __STDC__
long double
__tanhl (long double x)
#else
long double
__tanhl (x)
long double x;
#endif
{
long double t, z;
u_int32_t jx, ix;

View File

@ -48,12 +48,7 @@
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
long double __tanl(long double x)
#else
long double __tanl(x)
long double x;
#endif
long double __tanl(long double x)
{
long double y[2],z=0.0L;
int64_t n, ix;

View File

@ -25,20 +25,11 @@ static char rcsid[] = "$NetBSD: $";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const long double
#else
static long double
#endif
o_threshold= 1.1356523406294143949491931077970763428449E4L,
u_threshold= -1.1433462743336297878837243843452621503410E4;
#ifdef __STDC__
long double __expl(long double x) /* wrapper exp */
#else
long double __expl(x) /* wrapper exp */
long double x;
#endif
long double __expl(long double x) /* wrapper exp */
{
#ifdef _IEEE_LIBM
return __ieee754_expl(x);

View File

@ -57,11 +57,7 @@
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const long double
#else
static long double
#endif
one = 1.0L,
pio2_hi = 1.5707963267948966192313216916397514420986L,
pio2_lo = 4.3359050650618905123985220130216759843812E-35L,
@ -152,14 +148,8 @@ static long double
qS8 = -4.175375777334867025769346564600396877176E1L;
/* 1.000000000000000000000000000000000000000E0 */
#ifdef __STDC__
long double
__ieee754_acosl (long double x)
#else
long double
__ieee754_acosl (x)
long double x;
#endif
{
long double z, r, w, p, q, s, t, f2;
int32_t ix, sign;

View File

@ -63,11 +63,7 @@
#include "math_private.h"
long double sqrtl (long double);
#ifdef __STDC__
static const long double
#else
static long double
#endif
one = 1.0L,
huge = 1.0e+300L,
pio2_hi = 1.5707963267948966192313216916397514420986L,
@ -132,14 +128,8 @@ static long double
#ifdef __STDC__
long double
__ieee754_asinl (long double x)
#else
double
__ieee754_asinl (x)
long double x;
#endif
{
long double t, w, p, q, c, r, s;
int32_t ix, sign, flag;

View File

@ -59,26 +59,15 @@
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const long double
#else
static long double
#endif
invsqrtpi = 5.6418958354775628694807945156077258584405E-1L,
two = 2.0e0L,
one = 1.0e0L,
zero = 0.0L;
#ifdef __STDC__
long double
__ieee754_jnl (int n, long double x)
#else
long double
__ieee754_jnl (n, x)
int n;
long double x;
#endif
{
u_int32_t se;
int32_t i, ix, sgn;
@ -305,15 +294,8 @@ __ieee754_jnl (n, x)
}
strong_alias (__ieee754_jnl, __jnl_finite)
#ifdef __STDC__
long double
__ieee754_ynl (int n, long double x)
#else
long double
__ieee754_ynl (n, x)
int n;
long double x;
#endif
{
u_int32_t se;
int32_t i, ix;

View File

@ -58,11 +58,7 @@
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const long double
#else
static long double
#endif
one = 1.0L,
pio4hi = 7.8539816339744830961566084581987569936977E-1L,
pio4lo = 2.1679525325309452561992610065108379921906E-35L,
@ -85,15 +81,8 @@ static long double
/* 1.000000000000000000000000000000000000000E0 */
#ifdef __STDC__
long double
__kernel_tanl (long double x, long double y, int iy)
#else
long double
__kernel_tanl (x, y, iy)
long double x, y;
int iy;
#endif
{
long double z, r, v, w, s;
int32_t ix, sign;

View File

@ -29,21 +29,12 @@ static char rcsid[] = "$NetBSD: s_asinh.c,v 1.9 1995/05/12 04:57:37 jtc Exp $";
#include "math_private.h"
#include <math_ldbl_opt.h>
#ifdef __STDC__
static const long double
#else
static long double
#endif
one = 1.00000000000000000000e+00L, /* 0x3ff0000000000000, 0 */
ln2 = 0.6931471805599453094172321214581766L, /* 0x3fe62e42fefa39ef, 0x3c7abc9e3b398040 */
huge= 1.00000000000000000000e+300L;
#ifdef __STDC__
long double __asinhl(long double x)
#else
long double __asinhl(x)
long double x;
#endif
long double __asinhl(long double x)
{
long double t,w;
int64_t hx,ix;

View File

@ -1,6 +1,6 @@
/* Ceil (round to +inf) long double floating-point values.
IBM extended format long double version.
Copyright (C) 2006, 2007 Free Software Foundation, Inc.
Copyright (C) 2006, 2007, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -24,14 +24,8 @@
#include <ieee754.h>
#ifdef __STDC__
long double
__ceill (long double x)
#else
long double
__ceill (x)
long double x;
#endif
{
double xh, xl, hi, lo;

View File

@ -27,12 +27,7 @@ static char rcsid[] = "$NetBSD: $";
#include "math_private.h"
#include <math_ldbl_opt.h>
#ifdef __STDC__
long double __copysignl(long double x, long double y)
#else
long double __copysignl(x,y)
long double x,y;
#endif
long double __copysignl(long double x, long double y)
{
if (signbit (x) != signbit (y))
x = -x;

View File

@ -49,12 +49,7 @@
#include "math_private.h"
#include <math_ldbl_opt.h>
#ifdef __STDC__
long double __cosl(long double x)
#else
long double __cosl(x)
long double x;
#endif
long double __cosl(long double x)
{
long double y[2],z=0.0L;
int64_t n, ix;

View File

@ -137,11 +137,7 @@ deval (long double x, const long double *p, int n)
#ifdef __STDC__
static const long double
#else
static long double
#endif
tiny = 1e-300L,
half = 0.5L,
one = 1.0L,
@ -755,14 +751,8 @@ static const long double RDr1[NRDr1 + 1] =
};
#ifdef __STDC__
long double
__erfl (long double x)
#else
double
__erfl (x)
long double x;
#endif
{
long double a, y, z;
int32_t i, ix, sign;
@ -815,15 +805,8 @@ __erfl (x)
}
long_double_symbol (libm, __erfl, erfl);
#ifdef __STDC__
long double
__erfcl (long double x)
#else
long double
__erfcl (x)
double
x;
#endif
long double
__erfcl (long double x)
{
long double y, z, p, r;
int32_t i, ix, sign;

View File

@ -26,12 +26,7 @@ static char rcsid[] = "$NetBSD: $";
#include "math_private.h"
#include <math_ldbl_opt.h>
#ifdef __STDC__
long double __fabsl(long double x)
#else
long double __fabsl(x)
long double x;
#endif
long double __fabsl(long double x)
{
u_int64_t hx, lx;
GET_LDOUBLE_WORDS64(hx,lx,x);

View File

@ -1,6 +1,6 @@
/* Round to int long double floating-point values.
IBM extended format long double version.
Copyright (C) 2006, 2007 Free Software Foundation, Inc.
Copyright (C) 2006, 2007, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -24,14 +24,8 @@
#include <ieee754.h>
#ifdef __STDC__
long double
__floorl (long double x)
#else
long double
__floorl (x)
long double x;
#endif
{
double xh, xl, hi, lo;

View File

@ -31,19 +31,10 @@ static char rcsid[] = "$NetBSD: $";
#include "math_private.h"
#include <math_ldbl_opt.h>
#ifdef __STDC__
static const long double
#else
static long double
#endif
two107 = 162259276829213363391578010288128.0; /* 0x4670000000000000, 0 */
#ifdef __STDC__
long double __frexpl(long double x, int *eptr)
#else
long double __frexpl(x, eptr)
long double x; int *eptr;
#endif
long double __frexpl(long double x, int *eptr)
{
u_int64_t hx, lx, ix, ixl;
int64_t explo;

View File

@ -29,12 +29,7 @@ static char rcsid[] = "$NetBSD: $";
#include "math_private.h"
#include <math_ldbl_opt.h>
#ifdef __STDC__
int __ilogbl(long double x)
#else
int __ilogbl(x)
long double x;
#endif
int __ilogbl(long double x)
{
int64_t hx,lx;
int ix;

View File

@ -1,6 +1,6 @@
/* Round to long long int long double floating-point values.
IBM extended format long double version.
Copyright (C) 2006 Free Software Foundation, Inc.
Copyright (C) 2006, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -25,14 +25,8 @@
#include <ieee754.h>
#ifdef __STDC__
long long
__llrintl (long double x)
#else
long long
__llrintl (x)
long double x;
#endif
{
double xh, xl;
long long res, hi, lo;

View File

@ -1,6 +1,6 @@
/* Round to long long int long double floating-point values.
IBM extended format long double version.
Copyright (C) 2006 Free Software Foundation, Inc.
Copyright (C) 2006, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -24,14 +24,8 @@
#include <float.h>
#include <ieee754.h>
#ifdef __STDC__
long long
__llroundl (long double x)
#else
long long
__llroundl (x)
long double x;
#endif
{
double xh, xl;
long long res, hi, lo;

View File

@ -27,12 +27,7 @@ static char rcsid[] = "$NetBSD: $";
#include "math_private.h"
#include <math_ldbl_opt.h>
#ifdef __STDC__
long double __logbl(long double x)
#else
long double __logbl(x)
long double x;
#endif
long double __logbl(long double x)
{
int64_t lx,hx;
GET_LDOUBLE_WORDS64(hx,lx,x);

View File

@ -1,6 +1,6 @@
/* Round to long int long double floating-point values.
IBM extended format long double version.
Copyright (C) 2006 Free Software Foundation, Inc.
Copyright (C) 2006, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -25,14 +25,8 @@
#include <ieee754.h>
#ifdef __STDC__
long
__lrintl (long double x)
#else
long
__lrintl (x)
long double x;
#endif
{
double xh, xl;
long res, hi, lo;

View File

@ -1,6 +1,6 @@
/* Round to long int long double floating-point values.
IBM extended format long double version.
Copyright (C) 2006 Free Software Foundation, Inc.
Copyright (C) 2006, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -24,14 +24,8 @@
#include <float.h>
#include <ieee754.h>
#ifdef __STDC__
long
__lroundl (long double x)
#else
long
__lroundl (x)
long double x;
#endif
{
double xh, xl;
long res, hi, lo;

View File

@ -31,18 +31,9 @@ static char rcsid[] = "$NetBSD: $";
#include "math_private.h"
#include <math_ldbl_opt.h>
#ifdef __STDC__
static const long double one = 1.0;
#else
static long double one = 1.0;
#endif
#ifdef __STDC__
long double __modfl(long double x, long double *iptr)
#else
long double __modfl(x, iptr)
long double x,*iptr;
#endif
long double __modfl(long double x, long double *iptr)
{
int64_t i0,i1,j0;
u_int64_t i;

View File

@ -1,6 +1,6 @@
/* Round to int long double floating-point values without raising inexact.
IBM extended format long double version.
Copyright (C) 2006, 2008 Free Software Foundation, Inc.
Copyright (C) 2006, 2008, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -28,14 +28,8 @@
#include <ieee754.h>
#ifdef __STDC__
long double
__nearbyintl (long double x)
#else
long double
__nearbyintl (x)
long double x;
#endif
{
fenv_t env;
static const long double TWO52 = 4503599627370496.0L;

View File

@ -28,12 +28,7 @@ static char rcsid[] = "$NetBSD: $";
#include <math_private.h>
#include <math_ldbl_opt.h>
#ifdef __STDC__
long double __nextafterl(long double x, long double y)
#else
long double __nextafterl(x,y)
long double x,y;
#endif
long double __nextafterl(long double x, long double y)
{
int64_t hx,hy,ihx,ihy,ilx;
u_int64_t lx,ly;

View File

@ -30,13 +30,7 @@ static char rcsid[] = "$NetBSD: $";
#include <math_ldbl_opt.h>
#include <float.h>
#ifdef __STDC__
double __nexttoward(double x, long double y)
#else
double __nexttoward(x,y)
double x;
long double y;
#endif
double __nexttoward(double x, long double y)
{
int32_t hx,ix;
int64_t hy,iy;

View File

@ -23,13 +23,7 @@ static char rcsid[] = "$NetBSD: $";
#include <math_ldbl_opt.h>
#include <float.h>
#ifdef __STDC__
float __nexttowardf(float x, long double y)
#else
float __nexttowardf(x,y)
float x;
long double y;
#endif
float __nexttowardf(float x, long double y)
{
int32_t hx,ix;
int64_t hy,iy;

Some files were not shown because too many files have changed in this diff Show More