From 38b7304e932d52c8a4b250f35a1c8bcf6805d8ca Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Mon, 22 Dec 2008 15:58:54 +0000 Subject: libm/*: mass removal of: 1. static char rcsid[] = "$NetBSD: ..." 2. /* @(#)s_scalbn.c 5.1 93/09/24 */ 3. #ifdef __STDC__ No code changes (verified with objdump) --- libm/README | 1 - libm/e_acos.c | 16 +------ libm/e_acosh.c | 17 +------ libm/e_asin.c | 18 +------- libm/e_atan2.c | 17 +------ libm/e_atanh.c | 21 +-------- libm/e_cosh.c | 17 +------ libm/e_exp.c | 17 +------ libm/e_fmod.c | 16 +------ libm/e_gamma.c | 10 +---- libm/e_gamma_r.c | 11 +---- libm/e_hypot.c | 12 +---- libm/e_j0.c | 118 +------------------------------------------------ libm/e_j1.c | 122 +-------------------------------------------------- libm/e_jn.c | 28 +----------- libm/e_lgamma.c | 10 +---- libm/e_lgamma_r.c | 27 +----------- libm/e_log.c | 20 +-------- libm/e_log10.c | 22 +--------- libm/e_log2.c | 15 +------ libm/e_pow.c | 17 +------ libm/e_rem_pio2.c | 25 +---------- libm/e_remainder.c | 18 +------- libm/e_scalb.c | 20 +-------- libm/e_sinh.c | 17 +------ libm/e_sqrt.c | 20 ++------- libm/k_cos.c | 16 +------ libm/k_rem_pio2.c | 25 +---------- libm/k_sin.c | 16 +------ libm/k_standard.c | 18 +------- libm/k_tan.c | 17 +------ libm/math_private.h | 5 --- libm/s_asinh.c | 17 +------ libm/s_atan.c | 31 +------------ libm/s_cbrt.c | 20 +-------- libm/s_ceil.c | 16 +------ libm/s_copysign.c | 12 +---- libm/s_cos.c | 12 +---- libm/s_erf.c | 25 +---------- libm/s_expm1.c | 16 +------ libm/s_fabs.c | 12 +---- libm/s_fdim.c | 8 +--- libm/s_finite.c | 1 - libm/s_floor.c | 16 +------ libm/s_fmax.c | 8 +--- libm/s_fmin.c | 8 +--- libm/s_fpclassify.c | 3 +- libm/s_frexp.c | 16 +------ libm/s_ilogb.c | 12 +---- libm/s_isinf.c | 3 +- libm/s_isinff.c | 3 +- libm/s_isnan.c | 1 - libm/s_ldexp.c | 13 +----- libm/s_lib_version.c | 5 --- libm/s_llround.c | 1 - libm/s_log1p.c | 20 +-------- libm/s_logb.c | 13 +----- libm/s_lround.c | 1 - libm/s_matherr.c | 10 ----- libm/s_modf.c | 16 +------ libm/s_nearbyint.c | 7 +-- libm/s_nextafter.c | 12 +---- libm/s_remquo.c | 8 +--- libm/s_rint.c | 16 +------ libm/s_round.c | 2 - libm/s_scalbln.c | 12 +---- libm/s_scalbn.c | 17 +------ libm/s_significand.c | 13 +----- libm/s_sin.c | 12 +---- libm/s_tan.c | 12 +---- libm/s_tanh.c | 17 +------ libm/s_trunc.c | 2 - libm/w_acos.c | 12 +---- libm/w_acosh.c | 12 +---- libm/w_asin.c | 14 +----- libm/w_atan2.c | 13 +----- libm/w_atanh.c | 12 +---- libm/w_cabs.c | 1 - libm/w_cosh.c | 12 +---- libm/w_drem.c | 1 - libm/w_exp.c | 24 +++------- libm/w_exp2.c | 9 +--- libm/w_fmod.c | 12 +---- libm/w_gamma.c | 12 +---- libm/w_gamma_r.c | 14 +----- libm/w_hypot.c | 12 +---- libm/w_j0.c | 19 +------- libm/w_j1.c | 19 +------- libm/w_jn.c | 19 +------- libm/w_lgamma.c | 12 +---- libm/w_lgamma_r.c | 12 +---- libm/w_log.c | 12 +---- libm/w_log10.c | 12 +---- libm/w_log2.c | 5 ++- libm/w_pow.c | 8 +--- libm/w_remainder.c | 12 +---- libm/w_scalb.c | 18 +------- libm/w_sinh.c | 12 +---- libm/w_sqrt.c | 12 +---- libm/w_tgamma.c | 8 +--- 100 files changed, 113 insertions(+), 1425 deletions(-) (limited to 'libm') diff --git a/libm/README b/libm/README index 2c69a54af..306f03e40 100644 --- a/libm/README +++ b/libm/README @@ -13,4 +13,3 @@ is as follows: It has been ported to work with uClibc and generally behave by Erik Andersen 22 May, 2001 - diff --git a/libm/e_acos.c b/libm/e_acos.c index 265619325..5333b8e22 100644 --- a/libm/e_acos.c +++ b/libm/e_acos.c @@ -1,4 +1,3 @@ -/* @(#)e_acos.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: e_acos.c,v 1.9 1995/05/12 04:57:13 jtc Exp $"; -#endif - /* __ieee754_acos(x) * Method : * acos(x) = pi/2 - asin(x) @@ -41,11 +36,7 @@ static char rcsid[] = "$NetBSD: e_acos.c,v 1.9 1995/05/12 04:57:13 jtc Exp $"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ static const double -#else -static double -#endif one= 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ pi = 3.14159265358979311600e+00, /* 0x400921FB, 0x54442D18 */ pio2_hi = 1.57079632679489655800e+00, /* 0x3FF921FB, 0x54442D18 */ @@ -61,12 +52,7 @@ qS2 = 2.02094576023350569471e+00, /* 0x40002AE5, 0x9C598AC8 */ qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */ qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */ -#ifdef __STDC__ - double attribute_hidden __ieee754_acos(double x) -#else - double attribute_hidden __ieee754_acos(x) - double x; -#endif +double attribute_hidden __ieee754_acos(double x) { double z,p,q,r,w,s,c,df; int32_t hx,ix; diff --git a/libm/e_acosh.c b/libm/e_acosh.c index 3d0a038f0..2c70ad7c8 100644 --- a/libm/e_acosh.c +++ b/libm/e_acosh.c @@ -1,4 +1,3 @@ -/* @(#)e_acosh.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: e_acosh.c,v 1.9 1995/05/12 04:57:18 jtc Exp $"; -#endif - /* __ieee754_acosh(x) * Method : * Based on @@ -31,21 +26,11 @@ static char rcsid[] = "$NetBSD: e_acosh.c,v 1.9 1995/05/12 04:57:18 jtc Exp $"; #include "math.h" #include "math_private.h" - -#ifdef __STDC__ static const double -#else -static double -#endif one = 1.0, ln2 = 6.93147180559945286227e-01; /* 0x3FE62E42, 0xFEFA39EF */ -#ifdef __STDC__ - double attribute_hidden __ieee754_acosh(double x) -#else - double attribute_hidden __ieee754_acosh(x) - double x; -#endif +double attribute_hidden __ieee754_acosh(double x) { double t; int32_t hx; diff --git a/libm/e_asin.c b/libm/e_asin.c index ce8372c2d..b3ab73ff8 100644 --- a/libm/e_asin.c +++ b/libm/e_asin.c @@ -1,4 +1,3 @@ -/* @(#)e_asin.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: e_asin.c,v 1.9 1995/05/12 04:57:22 jtc Exp $"; -#endif - /* __ieee754_asin(x) * Method : * Since asin(x) = x + x^3/6 + x^5*3/40 + x^7*15/336 + ... @@ -44,16 +39,10 @@ static char rcsid[] = "$NetBSD: e_asin.c,v 1.9 1995/05/12 04:57:22 jtc Exp $"; * */ - #include "math.h" #include "math_private.h" - -#ifdef __STDC__ static const double -#else -static double -#endif one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ huge = 1.000e+300, pio2_hi = 1.57079632679489655800e+00, /* 0x3FF921FB, 0x54442D18 */ @@ -71,12 +60,7 @@ qS2 = 2.02094576023350569471e+00, /* 0x40002AE5, 0x9C598AC8 */ qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */ qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */ -#ifdef __STDC__ - double attribute_hidden __ieee754_asin(double x) -#else - double attribute_hidden __ieee754_asin(x) - double x; -#endif +double attribute_hidden __ieee754_asin(double x) { double t=0.0,w,p,q,c,r,s; int32_t hx,ix; diff --git a/libm/e_atan2.c b/libm/e_atan2.c index 407a12920..71c916d52 100644 --- a/libm/e_atan2.c +++ b/libm/e_atan2.c @@ -1,4 +1,3 @@ -/* @(#)e_atan2.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: e_atan2.c,v 1.8 1995/05/10 20:44:51 jtc Exp $"; -#endif - /* __ieee754_atan2(y,x) * Method : * 1. Reduce y to positive by atan2(y,x)=-atan2(-y,x). @@ -44,12 +39,7 @@ static char rcsid[] = "$NetBSD: e_atan2.c,v 1.8 1995/05/10 20:44:51 jtc Exp $"; #include "math.h" #include "math_private.h" - -#ifdef __STDC__ static const double -#else -static double -#endif tiny = 1.0e-300, zero = 0.0, pi_o_4 = 7.8539816339744827900E-01, /* 0x3FE921FB, 0x54442D18 */ @@ -57,12 +47,7 @@ pi_o_2 = 1.5707963267948965580E+00, /* 0x3FF921FB, 0x54442D18 */ pi = 3.1415926535897931160E+00, /* 0x400921FB, 0x54442D18 */ pi_lo = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */ -#ifdef __STDC__ - double attribute_hidden __ieee754_atan2(double y, double x) -#else - double attribute_hidden __ieee754_atan2(y,x) - double y,x; -#endif +double attribute_hidden __ieee754_atan2(double y, double x) { double z; int32_t k,m,hx,hy,ix,iy; diff --git a/libm/e_atanh.c b/libm/e_atanh.c index c6c47bcfa..673ef0cd6 100644 --- a/libm/e_atanh.c +++ b/libm/e_atanh.c @@ -1,4 +1,3 @@ -/* @(#)e_atanh.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: e_atanh.c,v 1.8 1995/05/10 20:44:55 jtc Exp $"; -#endif - /* __ieee754_atanh(x) * Method : * 1.Reduced x to positive by atanh(-x) = -atanh(x) @@ -35,25 +30,11 @@ static char rcsid[] = "$NetBSD: e_atanh.c,v 1.8 1995/05/10 20:44:55 jtc Exp $"; #include "math.h" #include "math_private.h" - -#ifdef __STDC__ static const double one = 1.0, huge = 1e300; -#else -static double one = 1.0, huge = 1e300; -#endif -#ifdef __STDC__ static const double zero = 0.0; -#else -static double zero = 0.0; -#endif -#ifdef __STDC__ - double attribute_hidden __ieee754_atanh(double x) -#else - double attribute_hidden __ieee754_atanh(x) - double x; -#endif +double attribute_hidden __ieee754_atanh(double x) { double t; int32_t hx,ix; diff --git a/libm/e_cosh.c b/libm/e_cosh.c index a7e5e4496..ddfd0254b 100644 --- a/libm/e_cosh.c +++ b/libm/e_cosh.c @@ -1,4 +1,3 @@ -/* @(#)e_cosh.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: e_cosh.c,v 1.7 1995/05/10 20:44:58 jtc Exp $"; -#endif - /* __ieee754_cosh(x) * Method : * mathematically cosh(x) if defined to be (exp(x)+exp(-x))/2 @@ -38,19 +33,9 @@ static char rcsid[] = "$NetBSD: e_cosh.c,v 1.7 1995/05/10 20:44:58 jtc Exp $"; #include "math.h" #include "math_private.h" - -#ifdef __STDC__ static const double one = 1.0, half=0.5, huge = 1.0e300; -#else -static double one = 1.0, half=0.5, huge = 1.0e300; -#endif -#ifdef __STDC__ - double attribute_hidden __ieee754_cosh(double x) -#else - double attribute_hidden __ieee754_cosh(x) - double x; -#endif +double attribute_hidden __ieee754_cosh(double x) { double t,w; int32_t ix; diff --git a/libm/e_exp.c b/libm/e_exp.c index f9c5371d9..ebf2e5af0 100644 --- a/libm/e_exp.c +++ b/libm/e_exp.c @@ -1,4 +1,3 @@ -/* @(#)e_exp.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: e_exp.c,v 1.8 1995/05/10 20:45:03 jtc Exp $"; -#endif - /* __ieee754_exp(x) * Returns the exponential of x. * @@ -80,11 +75,7 @@ static char rcsid[] = "$NetBSD: e_exp.c,v 1.8 1995/05/10 20:45:03 jtc Exp $"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ static const double -#else -static double -#endif one = 1.0, halF[2] = {0.5,-0.5,}, huge = 1.0e+300, @@ -102,13 +93,7 @@ P3 = 6.61375632143793436117e-05, /* 0x3F11566A, 0xAF25DE2C */ P4 = -1.65339022054652515390e-06, /* 0xBEBBBD41, 0xC5D26BF1 */ P5 = 4.13813679705723846039e-08; /* 0x3E663769, 0x72BEA4D0 */ - -#ifdef __STDC__ - double attribute_hidden __ieee754_exp(double x) /* default IEEE double exp */ -#else - double attribute_hidden __ieee754_exp(x) /* default IEEE double exp */ - double x; -#endif +double attribute_hidden __ieee754_exp(double x) /* default IEEE double exp */ { double y; double hi = 0.0; diff --git a/libm/e_fmod.c b/libm/e_fmod.c index 1e8487cf0..02cce63b0 100644 --- a/libm/e_fmod.c +++ b/libm/e_fmod.c @@ -1,4 +1,3 @@ -/* @(#)e_fmod.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: e_fmod.c,v 1.8 1995/05/10 20:45:07 jtc Exp $"; -#endif - /* * __ieee754_fmod(x,y) * Return x mod y in exact arithmetic @@ -23,18 +18,9 @@ static char rcsid[] = "$NetBSD: e_fmod.c,v 1.8 1995/05/10 20:45:07 jtc Exp $"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ static const double one = 1.0, Zero[] = {0.0, -0.0,}; -#else -static double one = 1.0, Zero[] = {0.0, -0.0,}; -#endif -#ifdef __STDC__ - double attribute_hidden __ieee754_fmod(double x, double y) -#else - double attribute_hidden __ieee754_fmod(x,y) - double x,y ; -#endif +double attribute_hidden __ieee754_fmod(double x, double y) { int32_t n,hx,hy,hz,ix,iy,sx,i; u_int32_t lx,ly,lz; diff --git a/libm/e_gamma.c b/libm/e_gamma.c index 05b3b86e8..d0809a10a 100644 --- a/libm/e_gamma.c +++ b/libm/e_gamma.c @@ -1,5 +1,4 @@ -/* @(#)e_gamma.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -22,13 +21,8 @@ #include "math_private.h" libm_hidden_proto(signgam) -#ifdef __STDC__ - /* __private_extern__ */ - double attribute_hidden __ieee754_gamma(double x) -#else - double attribute_hidden __ieee754_gamma(x) - double x; -#endif +/* __private_extern__ */ +double attribute_hidden __ieee754_gamma(double x) { return __ieee754_gamma_r(x,&signgam); } diff --git a/libm/e_gamma_r.c b/libm/e_gamma_r.c index 620f692b5..24411c7e1 100644 --- a/libm/e_gamma_r.c +++ b/libm/e_gamma_r.c @@ -1,5 +1,3 @@ - -/* @(#)e_gamma_r.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -21,13 +19,8 @@ #include "math_private.h" -#ifdef __STDC__ - /* __private_extern__ */ - double attribute_hidden __ieee754_gamma_r(double x, int *signgamp) -#else - double attribute_hidden __ieee754_gamma_r(x,signgamp) - double x; int *signgamp; -#endif +/* __private_extern__ */ +double attribute_hidden __ieee754_gamma_r(double x, int *signgamp) { return __ieee754_lgamma_r(x,signgamp); } diff --git a/libm/e_hypot.c b/libm/e_hypot.c index 62acc8d03..3a6b2133e 100644 --- a/libm/e_hypot.c +++ b/libm/e_hypot.c @@ -1,4 +1,3 @@ -/* @(#)e_hypot.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: e_hypot.c,v 1.9 1995/05/12 04:57:27 jtc Exp $"; -#endif - /* __ieee754_hypot(x,y) * * Method : @@ -49,12 +44,7 @@ static char rcsid[] = "$NetBSD: e_hypot.c,v 1.9 1995/05/12 04:57:27 jtc Exp $"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ - double attribute_hidden __ieee754_hypot(double x, double y) -#else - double attribute_hidden __ieee754_hypot(x,y) - double x, y; -#endif +double attribute_hidden __ieee754_hypot(double x, double y) { double a=x,b=y,t1,t2,y1,y2,w; int32_t j,k,ha,hb; diff --git a/libm/e_j0.c b/libm/e_j0.c index 7778788fb..0c34ceb91 100644 --- a/libm/e_j0.c +++ b/libm/e_j0.c @@ -1,4 +1,3 @@ -/* @(#)e_j0.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: e_j0.c,v 1.8 1995/05/10 20:45:23 jtc Exp $"; -#endif - /* __ieee754_j0(x), __ieee754_y0(x) * Bessel function of the first and second kinds of order zero. * Method -- j0(x): @@ -62,18 +57,9 @@ static char rcsid[] = "$NetBSD: e_j0.c,v 1.8 1995/05/10 20:45:23 jtc Exp $"; #include "math.h" #include "math_private.h" - -#ifdef __STDC__ static double pzero(double), qzero(double); -#else -static double pzero(), qzero(); -#endif -#ifdef __STDC__ static const double -#else -static double -#endif huge = 1e300, one = 1.0, invsqrtpi= 5.64189583547756279280e-01, /* 0x3FE20DD7, 0x50429B6D */ @@ -88,18 +74,9 @@ S02 = 1.16926784663337450260e-04, /* 0x3F1EA6D2, 0xDD57DBF4 */ S03 = 5.13546550207318111446e-07, /* 0x3EA13B54, 0xCE84D5A9 */ S04 = 1.16614003333790000205e-09; /* 0x3E1408BC, 0xF4745D8F */ -#ifdef __STDC__ static const double zero = 0.0; -#else -static double zero = 0.0; -#endif -#ifdef __STDC__ - double attribute_hidden __ieee754_j0(double x) -#else - double attribute_hidden __ieee754_j0(x) - double x; -#endif +double attribute_hidden __ieee754_j0(double x) { double z, s,c,ss,cc,r,u,v; int32_t hx,ix; @@ -146,11 +123,7 @@ static double zero = 0.0; } } -#ifdef __STDC__ static const double -#else -static double -#endif u00 = -7.38042951086872317523e-02, /* 0xBFB2E4D6, 0x99CBD01F */ u01 = 1.76666452509181115538e-01, /* 0x3FC69D01, 0x9DE9E3FC */ u02 = -1.38185671945596898896e-02, /* 0xBF8C4CE8, 0xB16CFA97 */ @@ -163,12 +136,7 @@ v02 = 7.60068627350353253702e-05, /* 0x3F13ECBB, 0xF578C6C1 */ v03 = 2.59150851840457805467e-07, /* 0x3E91642D, 0x7FF202FD */ v04 = 4.41110311332675467403e-10; /* 0x3DFE5018, 0x3BD6D9EF */ -#ifdef __STDC__ - double attribute_hidden __ieee754_y0(double x) -#else - double attribute_hidden __ieee754_y0(x) - double x; -#endif +double attribute_hidden __ieee754_y0(double x) { double z, s,c,ss,cc,u,v; int32_t hx,ix,lx; @@ -229,11 +197,7 @@ v04 = 4.41110311332675467403e-10; /* 0x3DFE5018, 0x3BD6D9EF */ * and * | pzero(x)-1-R/S | <= 2 ** ( -60.26) */ -#ifdef __STDC__ static const double pR8[6] = { /* for x in [inf, 8]=1/[0,0.125] */ -#else -static double pR8[6] = { /* for x in [inf, 8]=1/[0,0.125] */ -#endif 0.00000000000000000000e+00, /* 0x00000000, 0x00000000 */ -7.03124999999900357484e-02, /* 0xBFB1FFFF, 0xFFFFFD32 */ -8.08167041275349795626e+00, /* 0xC02029D0, 0xB44FA779 */ @@ -241,11 +205,7 @@ static double pR8[6] = { /* for x in [inf, 8]=1/[0,0.125] */ -2.48521641009428822144e+03, /* 0xC0A36A6E, 0xCD4DCAFC */ -5.25304380490729545272e+03, /* 0xC0B4850B, 0x36CC643D */ }; -#ifdef __STDC__ static const double pS8[5] = { -#else -static double pS8[5] = { -#endif 1.16534364619668181717e+02, /* 0x405D2233, 0x07A96751 */ 3.83374475364121826715e+03, /* 0x40ADF37D, 0x50596938 */ 4.05978572648472545552e+04, /* 0x40E3D2BB, 0x6EB6B05F */ @@ -253,11 +213,7 @@ static double pS8[5] = { 4.76277284146730962675e+04, /* 0x40E74177, 0x4F2C49DC */ }; -#ifdef __STDC__ static const double pR5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */ -#else -static double pR5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */ -#endif -1.14125464691894502584e-11, /* 0xBDA918B1, 0x47E495CC */ -7.03124940873599280078e-02, /* 0xBFB1FFFF, 0xE69AFBC6 */ -4.15961064470587782438e+00, /* 0xC010A370, 0xF90C6BBF */ @@ -265,11 +221,7 @@ static double pR5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */ -3.31231299649172967747e+02, /* 0xC074B3B3, 0x6742CC63 */ -3.46433388365604912451e+02, /* 0xC075A6EF, 0x28A38BD7 */ }; -#ifdef __STDC__ static const double pS5[5] = { -#else -static double pS5[5] = { -#endif 6.07539382692300335975e+01, /* 0x404E6081, 0x0C98C5DE */ 1.05125230595704579173e+03, /* 0x40906D02, 0x5C7E2864 */ 5.97897094333855784498e+03, /* 0x40B75AF8, 0x8FBE1D60 */ @@ -277,11 +229,7 @@ static double pS5[5] = { 2.40605815922939109441e+03, /* 0x40A2CC1D, 0xC70BE864 */ }; -#ifdef __STDC__ static const double pR3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */ -#else -static double pR3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */ -#endif -2.54704601771951915620e-09, /* 0xBE25E103, 0x6FE1AA86 */ -7.03119616381481654654e-02, /* 0xBFB1FFF6, 0xF7C0E24B */ -2.40903221549529611423e+00, /* 0xC00345B2, 0xAEA48074 */ @@ -289,11 +237,7 @@ static double pR3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */ -5.80791704701737572236e+01, /* 0xC04D0A22, 0x420A1A45 */ -3.14479470594888503854e+01, /* 0xC03F72AC, 0xA892D80F */ }; -#ifdef __STDC__ static const double pS3[5] = { -#else -static double pS3[5] = { -#endif 3.58560338055209726349e+01, /* 0x4041ED92, 0x84077DD3 */ 3.61513983050303863820e+02, /* 0x40769839, 0x464A7C0E */ 1.19360783792111533330e+03, /* 0x4092A66E, 0x6D1061D6 */ @@ -301,11 +245,7 @@ static double pS3[5] = { 1.73580930813335754692e+02, /* 0x4065B296, 0xFC379081 */ }; -#ifdef __STDC__ static const double pR2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */ -#else -static double pR2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */ -#endif -8.87534333032526411254e-08, /* 0xBE77D316, 0xE927026D */ -7.03030995483624743247e-02, /* 0xBFB1FF62, 0x495E1E42 */ -1.45073846780952986357e+00, /* 0xBFF73639, 0x8A24A843 */ @@ -313,11 +253,7 @@ static double pR2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */ -1.11931668860356747786e+01, /* 0xC02662E6, 0xC5246303 */ -3.23364579351335335033e+00, /* 0xC009DE81, 0xAF8FE70F */ }; -#ifdef __STDC__ static const double pS2[5] = { -#else -static double pS2[5] = { -#endif 2.22202997532088808441e+01, /* 0x40363865, 0x908B5959 */ 1.36206794218215208048e+02, /* 0x4061069E, 0x0EE8878F */ 2.70470278658083486789e+02, /* 0x4070E786, 0x42EA079B */ @@ -325,18 +261,9 @@ static double pS2[5] = { 1.46576176948256193810e+01, /* 0x402D50B3, 0x44391809 */ }; -#ifdef __STDC__ static double pzero(double x) -#else - static double pzero(x) - double x; -#endif { -#ifdef __STDC__ const double *p = 0,*q = 0; -#else - double *p,*q; -#endif double z,r,s; int32_t ix; GET_HIGH_WORD(ix,x); @@ -361,11 +288,7 @@ static double pS2[5] = { * and * | qzero(x)/s +1.25-R/S | <= 2 ** ( -61.22) */ -#ifdef __STDC__ static const double qR8[6] = { /* for x in [inf, 8]=1/[0,0.125] */ -#else -static double qR8[6] = { /* for x in [inf, 8]=1/[0,0.125] */ -#endif 0.00000000000000000000e+00, /* 0x00000000, 0x00000000 */ 7.32421874999935051953e-02, /* 0x3FB2BFFF, 0xFFFFFE2C */ 1.17682064682252693899e+01, /* 0x40278952, 0x5BB334D6 */ @@ -373,11 +296,7 @@ static double qR8[6] = { /* for x in [inf, 8]=1/[0,0.125] */ 8.85919720756468632317e+03, /* 0x40C14D99, 0x3E18F46D */ 3.70146267776887834771e+04, /* 0x40E212D4, 0x0E901566 */ }; -#ifdef __STDC__ static const double qS8[6] = { -#else -static double qS8[6] = { -#endif 1.63776026895689824414e+02, /* 0x406478D5, 0x365B39BC */ 8.09834494656449805916e+03, /* 0x40BFA258, 0x4E6B0563 */ 1.42538291419120476348e+05, /* 0x41016652, 0x54D38C3F */ @@ -386,11 +305,7 @@ static double qS8[6] = { -3.43899293537866615225e+05, /* 0xC114FD6D, 0x2C9530C5 */ }; -#ifdef __STDC__ static const double qR5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */ -#else -static double qR5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */ -#endif 1.84085963594515531381e-11, /* 0x3DB43D8F, 0x29CC8CD9 */ 7.32421766612684765896e-02, /* 0x3FB2BFFF, 0xD172B04C */ 5.83563508962056953777e+00, /* 0x401757B0, 0xB9953DD3 */ @@ -398,11 +313,7 @@ static double qR5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */ 1.02724376596164097464e+03, /* 0x40900CF9, 0x9DC8C481 */ 1.98997785864605384631e+03, /* 0x409F17E9, 0x53C6E3A6 */ }; -#ifdef __STDC__ static const double qS5[6] = { -#else -static double qS5[6] = { -#endif 8.27766102236537761883e+01, /* 0x4054B1B3, 0xFB5E1543 */ 2.07781416421392987104e+03, /* 0x40A03BA0, 0xDA21C0CE */ 1.88472887785718085070e+04, /* 0x40D267D2, 0x7B591E6D */ @@ -411,11 +322,7 @@ static double qS5[6] = { -5.35434275601944773371e+03, /* 0xC0B4EA57, 0xBEDBC609 */ }; -#ifdef __STDC__ static const double qR3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */ -#else -static double qR3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */ -#endif 4.37741014089738620906e-09, /* 0x3E32CD03, 0x6ADECB82 */ 7.32411180042911447163e-02, /* 0x3FB2BFEE, 0x0E8D0842 */ 3.34423137516170720929e+00, /* 0x400AC0FC, 0x61149CF5 */ @@ -423,11 +330,7 @@ static double qR3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */ 1.70808091340565596283e+02, /* 0x406559DB, 0xE25EFD1F */ 1.66733948696651168575e+02, /* 0x4064D77C, 0x81FA21E0 */ }; -#ifdef __STDC__ static const double qS3[6] = { -#else -static double qS3[6] = { -#endif 4.87588729724587182091e+01, /* 0x40486122, 0xBFE343A6 */ 7.09689221056606015736e+02, /* 0x40862D83, 0x86544EB3 */ 3.70414822620111362994e+03, /* 0x40ACF04B, 0xE44DFC63 */ @@ -436,11 +339,7 @@ static double qS3[6] = { -1.49247451836156386662e+02, /* 0xC062A7EB, 0x201CF40F */ }; -#ifdef __STDC__ static const double qR2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */ -#else -static double qR2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */ -#endif 1.50444444886983272379e-07, /* 0x3E84313B, 0x54F76BDB */ 7.32234265963079278272e-02, /* 0x3FB2BEC5, 0x3E883E34 */ 1.99819174093815998816e+00, /* 0x3FFFF897, 0xE727779C */ @@ -448,11 +347,7 @@ static double qR2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */ 3.16662317504781540833e+01, /* 0x403FAA8E, 0x29FBDC4A */ 1.62527075710929267416e+01, /* 0x403040B1, 0x71814BB4 */ }; -#ifdef __STDC__ static const double qS2[6] = { -#else -static double qS2[6] = { -#endif 3.03655848355219184498e+01, /* 0x403E5D96, 0xF7C07AED */ 2.69348118608049844624e+02, /* 0x4070D591, 0xE4D14B40 */ 8.44783757595320139444e+02, /* 0x408A6645, 0x22B3BF22 */ @@ -461,18 +356,9 @@ static double qS2[6] = { -5.31095493882666946917e+00, /* 0xC0153E6A, 0xF8B32931 */ }; -#ifdef __STDC__ static double qzero(double x) -#else - static double qzero(x) - double x; -#endif { -#ifdef __STDC__ const double *p=0,*q=0; -#else - double *p,*q; -#endif double s,r,z; int32_t ix; GET_HIGH_WORD(ix,x); diff --git a/libm/e_j1.c b/libm/e_j1.c index 4b4274ae5..92e15ce75 100644 --- a/libm/e_j1.c +++ b/libm/e_j1.c @@ -1,4 +1,3 @@ -/* @(#)e_j1.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: e_j1.c,v 1.8 1995/05/10 20:45:27 jtc Exp $"; -#endif - /* __ieee754_j1(x), __ieee754_y1(x) * Bessel function of the first and second kinds of order zero. * Method -- j1(x): @@ -62,18 +57,9 @@ static char rcsid[] = "$NetBSD: e_j1.c,v 1.8 1995/05/10 20:45:27 jtc Exp $"; #include "math.h" #include "math_private.h" - -#ifdef __STDC__ static double pone(double), qone(double); -#else -static double pone(), qone(); -#endif -#ifdef __STDC__ static const double -#else -static double -#endif huge = 1e300, one = 1.0, invsqrtpi= 5.64189583547756279280e-01, /* 0x3FE20DD7, 0x50429B6D */ @@ -89,18 +75,9 @@ s03 = 1.17718464042623683263e-06, /* 0x3EB3BFF8, 0x333F8498 */ s04 = 5.04636257076217042715e-09, /* 0x3E35AC88, 0xC97DFF2C */ s05 = 1.23542274426137913908e-11; /* 0x3DAB2ACF, 0xCFB97ED8 */ -#ifdef __STDC__ static const double zero = 0.0; -#else -static double zero = 0.0; -#endif -#ifdef __STDC__ - double attribute_hidden __ieee754_j1(double x) -#else - double attribute_hidden __ieee754_j1(x) - double x; -#endif +double attribute_hidden __ieee754_j1(double x) { double z, s,c,ss,cc,r,u,v,y; int32_t hx,ix; @@ -141,22 +118,14 @@ static double zero = 0.0; return(x*0.5+r/s); } -#ifdef __STDC__ static const double U0[5] = { -#else -static double U0[5] = { -#endif -1.96057090646238940668e-01, /* 0xBFC91866, 0x143CBC8A */ 5.04438716639811282616e-02, /* 0x3FA9D3C7, 0x76292CD1 */ -1.91256895875763547298e-03, /* 0xBF5F55E5, 0x4844F50F */ 2.35252600561610495928e-05, /* 0x3EF8AB03, 0x8FA6B88E */ -9.19099158039878874504e-08, /* 0xBE78AC00, 0x569105B8 */ }; -#ifdef __STDC__ static const double V0[5] = { -#else -static double V0[5] = { -#endif 1.99167318236649903973e-02, /* 0x3F94650D, 0x3F4DA9F0 */ 2.02552581025135171496e-04, /* 0x3F2A8C89, 0x6C257764 */ 1.35608801097516229404e-06, /* 0x3EB6C05A, 0x894E8CA6 */ @@ -164,12 +133,7 @@ static double V0[5] = { 1.66559246207992079114e-11, /* 0x3DB25039, 0xDACA772A */ }; -#ifdef __STDC__ - double attribute_hidden __ieee754_y1(double x) -#else - double attribute_hidden __ieee754_y1(x) - double x; -#endif +double attribute_hidden __ieee754_y1(double x) { double z, s,c,ss,cc,u,v; int32_t hx,ix,lx; @@ -227,11 +191,7 @@ static double V0[5] = { * | pone(x)-1-R/S | <= 2 ** ( -60.06) */ -#ifdef __STDC__ static const double pr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */ -#else -static double pr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */ -#endif 0.00000000000000000000e+00, /* 0x00000000, 0x00000000 */ 1.17187499999988647970e-01, /* 0x3FBDFFFF, 0xFFFFFCCE */ 1.32394806593073575129e+01, /* 0x402A7A9D, 0x357F7FCE */ @@ -239,11 +199,7 @@ static double pr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */ 3.87474538913960532227e+03, /* 0x40AE457D, 0xA3A532CC */ 7.91447954031891731574e+03, /* 0x40BEEA7A, 0xC32782DD */ }; -#ifdef __STDC__ static const double ps8[5] = { -#else -static double ps8[5] = { -#endif 1.14207370375678408436e+02, /* 0x405C8D45, 0x8E656CAC */ 3.65093083420853463394e+03, /* 0x40AC85DC, 0x964D274F */ 3.69562060269033463555e+04, /* 0x40E20B86, 0x97C5BB7F */ @@ -251,11 +207,7 @@ static double ps8[5] = { 3.08042720627888811578e+04, /* 0x40DE1511, 0x697A0B2D */ }; -#ifdef __STDC__ static const double pr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */ -#else -static double pr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */ -#endif 1.31990519556243522749e-11, /* 0x3DAD0667, 0xDAE1CA7D */ 1.17187493190614097638e-01, /* 0x3FBDFFFF, 0xE2C10043 */ 6.80275127868432871736e+00, /* 0x401B3604, 0x6E6315E3 */ @@ -263,11 +215,7 @@ static double pr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */ 5.17636139533199752805e+02, /* 0x40802D16, 0xD052D649 */ 5.28715201363337541807e+02, /* 0x408085B8, 0xBB7E0CB7 */ }; -#ifdef __STDC__ static const double ps5[5] = { -#else -static double ps5[5] = { -#endif 5.92805987221131331921e+01, /* 0x404DA3EA, 0xA8AF633D */ 9.91401418733614377743e+02, /* 0x408EFB36, 0x1B066701 */ 5.35326695291487976647e+03, /* 0x40B4E944, 0x5706B6FB */ @@ -275,11 +223,7 @@ static double ps5[5] = { 1.50404688810361062679e+03, /* 0x40978030, 0x036F5E51 */ }; -#ifdef __STDC__ static const double pr3[6] = { -#else -static double pr3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */ -#endif 3.02503916137373618024e-09, /* 0x3E29FC21, 0xA7AD9EDD */ 1.17186865567253592491e-01, /* 0x3FBDFFF5, 0x5B21D17B */ 3.93297750033315640650e+00, /* 0x400F76BC, 0xE85EAD8A */ @@ -287,11 +231,7 @@ static double pr3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */ 9.10550110750781271918e+01, /* 0x4056C385, 0x4D2C1837 */ 4.85590685197364919645e+01, /* 0x4048478F, 0x8EA83EE5 */ }; -#ifdef __STDC__ static const double ps3[5] = { -#else -static double ps3[5] = { -#endif 3.47913095001251519989e+01, /* 0x40416549, 0xA134069C */ 3.36762458747825746741e+02, /* 0x40750C33, 0x07F1A75F */ 1.04687139975775130551e+03, /* 0x40905B7C, 0x5037D523 */ @@ -299,11 +239,7 @@ static double ps3[5] = { 1.03787932439639277504e+02, /* 0x4059F26D, 0x7C2EED53 */ }; -#ifdef __STDC__ static const double pr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */ -#else -static double pr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */ -#endif 1.07710830106873743082e-07, /* 0x3E7CE9D4, 0xF65544F4 */ 1.17176219462683348094e-01, /* 0x3FBDFF42, 0xBE760D83 */ 2.36851496667608785174e+00, /* 0x4002F2B7, 0xF98FAEC0 */ @@ -311,11 +247,7 @@ static double pr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */ 1.76939711271687727390e+01, /* 0x4031B1A8, 0x177F8EE2 */ 5.07352312588818499250e+00, /* 0x40144B49, 0xA574C1FE */ }; -#ifdef __STDC__ static const double ps2[5] = { -#else -static double ps2[5] = { -#endif 2.14364859363821409488e+01, /* 0x40356FBD, 0x8AD5ECDC */ 1.25290227168402751090e+02, /* 0x405F5293, 0x14F92CD5 */ 2.32276469057162813669e+02, /* 0x406D08D8, 0xD5A2DBD9 */ @@ -323,18 +255,9 @@ static double ps2[5] = { 8.36463893371618283368e+00, /* 0x4020BAB1, 0xF44E5192 */ }; -#ifdef __STDC__ static double pone(double x) -#else - static double pone(x) - double x; -#endif { -#ifdef __STDC__ const double *p=0,*q=0; -#else - double *p,*q; -#endif double z,r,s; int32_t ix; GET_HIGH_WORD(ix,x); @@ -360,11 +283,7 @@ static double ps2[5] = { * | qone(x)/s -0.375-R/S | <= 2 ** ( -61.13) */ -#ifdef __STDC__ static const double qr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */ -#else -static double qr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */ -#endif 0.00000000000000000000e+00, /* 0x00000000, 0x00000000 */ -1.02539062499992714161e-01, /* 0xBFBA3FFF, 0xFFFFFDF3 */ -1.62717534544589987888e+01, /* 0xC0304591, 0xA26779F7 */ @@ -372,11 +291,7 @@ static double qr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */ -1.18498066702429587167e+04, /* 0xC0C724E7, 0x40F87415 */ -4.84385124285750353010e+04, /* 0xC0E7A6D0, 0x65D09C6A */ }; -#ifdef __STDC__ static const double qs8[6] = { -#else -static double qs8[6] = { -#endif 1.61395369700722909556e+02, /* 0x40642CA6, 0xDE5BCDE5 */ 7.82538599923348465381e+03, /* 0x40BE9162, 0xD0D88419 */ 1.33875336287249578163e+05, /* 0x4100579A, 0xB0B75E98 */ @@ -385,11 +300,7 @@ static double qs8[6] = { -2.94490264303834643215e+05, /* 0xC111F969, 0x0EA5AA18 */ }; -#ifdef __STDC__ static const double qr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */ -#else -static double qr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */ -#endif -2.08979931141764104297e-11, /* 0xBDB6FA43, 0x1AA1A098 */ -1.02539050241375426231e-01, /* 0xBFBA3FFF, 0xCB597FEF */ -8.05644828123936029840e+00, /* 0xC0201CE6, 0xCA03AD4B */ @@ -397,11 +308,7 @@ static double qr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */ -1.37319376065508163265e+03, /* 0xC09574C6, 0x6931734F */ -2.61244440453215656817e+03, /* 0xC0A468E3, 0x88FDA79D */ }; -#ifdef __STDC__ static const double qs5[6] = { -#else -static double qs5[6] = { -#endif 8.12765501384335777857e+01, /* 0x405451B2, 0xFF5A11B2 */ 1.99179873460485964642e+03, /* 0x409F1F31, 0xE77BF839 */ 1.74684851924908907677e+04, /* 0x40D10F1F, 0x0D64CE29 */ @@ -410,11 +317,7 @@ static double qs5[6] = { -4.71918354795128470869e+03, /* 0xC0B26F2E, 0xFCFFA004 */ }; -#ifdef __STDC__ static const double qr3[6] = { -#else -static double qr3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */ -#endif -5.07831226461766561369e-09, /* 0xBE35CFA9, 0xD38FC84F */ -1.02537829820837089745e-01, /* 0xBFBA3FEB, 0x51AEED54 */ -4.61011581139473403113e+00, /* 0xC01270C2, 0x3302D9FF */ @@ -422,11 +325,7 @@ static double qr3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */ -2.28244540737631695038e+02, /* 0xC06C87D3, 0x4718D55F */ -2.19210128478909325622e+02, /* 0xC06B66B9, 0x5F5C1BF6 */ }; -#ifdef __STDC__ static const double qs3[6] = { -#else -static double qs3[6] = { -#endif 4.76651550323729509273e+01, /* 0x4047D523, 0xCCD367E4 */ 6.73865112676699709482e+02, /* 0x40850EEB, 0xC031EE3E */ 3.38015286679526343505e+03, /* 0x40AA684E, 0x448E7C9A */ @@ -435,11 +334,7 @@ static double qs3[6] = { -1.35201191444307340817e+02, /* 0xC060E670, 0x290A311F */ }; -#ifdef __STDC__ static const double qr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */ -#else -static double qr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */ -#endif -1.78381727510958865572e-07, /* 0xBE87F126, 0x44C626D2 */ -1.02517042607985553460e-01, /* 0xBFBA3E8E, 0x9148B010 */ -2.75220568278187460720e+00, /* 0xC0060484, 0x69BB4EDA */ @@ -447,11 +342,7 @@ static double qr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */ -4.23253133372830490089e+01, /* 0xC04529A3, 0xDE104AAA */ -2.13719211703704061733e+01, /* 0xC0355F36, 0x39CF6E52 */ }; -#ifdef __STDC__ static const double qs2[6] = { -#else -static double qs2[6] = { -#endif 2.95333629060523854548e+01, /* 0x403D888A, 0x78AE64FF */ 2.52981549982190529136e+02, /* 0x406F9F68, 0xDB821CBA */ 7.57502834868645436472e+02, /* 0x4087AC05, 0xCE49A0F7 */ @@ -460,18 +351,9 @@ static double qs2[6] = { -4.95949898822628210127e+00, /* 0xC013D686, 0xE71BE86B */ }; -#ifdef __STDC__ static double qone(double x) -#else - static double qone(x) - double x; -#endif { -#ifdef __STDC__ const double *p=0,*q=0; -#else - double *p,*q; -#endif double s,r,z; int32_t ix; GET_HIGH_WORD(ix,x); diff --git a/libm/e_jn.c b/libm/e_jn.c index 7771eaf5d..b12a7f33a 100644 --- a/libm/e_jn.c +++ b/libm/e_jn.c @@ -1,4 +1,3 @@ -/* @(#)e_jn.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: e_jn.c,v 1.9 1995/05/10 20:45:34 jtc Exp $"; -#endif - /* * __ieee754_jn(n, x), __ieee754_yn(n, x) * floating point Bessel's function of the 1st and 2nd kind @@ -43,28 +38,14 @@ static char rcsid[] = "$NetBSD: e_jn.c,v 1.9 1995/05/10 20:45:34 jtc Exp $"; #include "math.h" #include "math_private.h" - -#ifdef __STDC__ static const double -#else -static double -#endif invsqrtpi= 5.64189583547756279280e-01, /* 0x3FE20DD7, 0x50429B6D */ two = 2.00000000000000000000e+00, /* 0x40000000, 0x00000000 */ one = 1.00000000000000000000e+00; /* 0x3FF00000, 0x00000000 */ -#ifdef __STDC__ static const double zero = 0.00000000000000000000e+00; -#else -static double zero = 0.00000000000000000000e+00; -#endif -#ifdef __STDC__ - double attribute_hidden __ieee754_jn(int n, double x) -#else - double attribute_hidden __ieee754_jn(n,x) - int n; double x; -#endif +double attribute_hidden __ieee754_jn(int n, double x) { int32_t i,hx,ix,lx, sgn; double a, b, temp=0, di; @@ -219,12 +200,7 @@ static double zero = 0.00000000000000000000e+00; if(sgn==1) return -b; else return b; } -#ifdef __STDC__ - double attribute_hidden __ieee754_yn(int n, double x) -#else - double attribute_hidden __ieee754_yn(n,x) - int n; double x; -#endif +double attribute_hidden __ieee754_yn(int n, double x) { int32_t i,hx,ix,lx; int32_t sign; diff --git a/libm/e_lgamma.c b/libm/e_lgamma.c index af7cccf54..9bc9da60b 100644 --- a/libm/e_lgamma.c +++ b/libm/e_lgamma.c @@ -1,5 +1,4 @@ -/* @(#)e_lgamma.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -22,13 +21,8 @@ #include "math_private.h" libm_hidden_proto(signgam) -#ifdef __STDC__ - /* __private_extern__ */ - double attribute_hidden __ieee754_lgamma(double x) -#else - double attribute_hidden __ieee754_lgamma(x) - double x; -#endif +/* __private_extern__ */ +double attribute_hidden __ieee754_lgamma(double x) { return __ieee754_lgamma_r(x,&signgam); } diff --git a/libm/e_lgamma_r.c b/libm/e_lgamma_r.c index 42b48b3a6..b578a2cea 100644 --- a/libm/e_lgamma_r.c +++ b/libm/e_lgamma_r.c @@ -1,4 +1,3 @@ -/* @(#)er_lgamma.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: e_lgamma_r.c,v 1.7 1995/05/10 20:45:42 jtc Exp $"; -#endif - /* __ieee754_lgamma_r(x, signgamp) * Reentrant version of the logarithm of the Gamma function * with user provide pointer for the sign of Gamma(x). @@ -84,11 +79,7 @@ static char rcsid[] = "$NetBSD: e_lgamma_r.c,v 1.7 1995/05/10 20:45:42 jtc Exp $ #include "math.h" #include "math_private.h" -#ifdef __STDC__ static const double -#else -static double -#endif two52= 4.50359962737049600000e+15, /* 0x43300000, 0x00000000 */ half= 5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */ one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ @@ -156,22 +147,13 @@ w4 = -5.95187557450339963135e-04, /* 0xBF4380CB, 0x8C0FE741 */ w5 = 8.36339918996282139126e-04, /* 0x3F4B67BA, 0x4CDAD5D1 */ w6 = -1.63092934096575273989e-03; /* 0xBF5AB89D, 0x0B9E43E4 */ -#ifdef __STDC__ static const double zero= 0.00000000000000000000e+00; -#else -static double zero= 0.00000000000000000000e+00; -#endif static #ifdef __GNUC__ __inline__ #endif -#ifdef __STDC__ - double sin_pi(double x) -#else - double sin_pi(x) - double x; -#endif +double sin_pi(double x) { double y,z; int n,ix; @@ -216,12 +198,7 @@ __inline__ } -#ifdef __STDC__ - double attribute_hidden __ieee754_lgamma_r(double x, int *signgamp) -#else - double attribute_hidden __ieee754_lgamma_r(x,signgamp) - double x; int *signgamp; -#endif +double attribute_hidden __ieee754_lgamma_r(double x, int *signgamp) { double t,y,z,nadj=0,p,p1,p2,p3,q,r,w; int i,hx,lx,ix; diff --git a/libm/e_log.c b/libm/e_log.c index fce0617aa..721746a16 100644 --- a/libm/e_log.c +++ b/libm/e_log.c @@ -1,4 +1,3 @@ -/* @(#)e_log.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: e_log.c,v 1.8 1995/05/10 20:45:49 jtc Exp $"; -#endif - /* __ieee754_log(x) * Return the logrithm of x * @@ -68,11 +63,7 @@ static char rcsid[] = "$NetBSD: e_log.c,v 1.8 1995/05/10 20:45:49 jtc Exp $"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ static const double -#else -static double -#endif ln2_hi = 6.93147180369123816490e-01, /* 3fe62e42 fee00000 */ ln2_lo = 1.90821492927058770002e-10, /* 3dea39ef 35793c76 */ two54 = 1.80143985094819840000e+16, /* 43500000 00000000 */ @@ -84,18 +75,9 @@ Lg5 = 1.818357216161805012e-01, /* 3FC74664 96CB03DE */ Lg6 = 1.531383769920937332e-01, /* 3FC39A09 D078C69F */ Lg7 = 1.479819860511658591e-01; /* 3FC2F112 DF3E5244 */ -#ifdef __STDC__ static const double zero = 0.0; -#else -static double zero = 0.0; -#endif -#ifdef __STDC__ - double attribute_hidden __ieee754_log(double x) -#else - double attribute_hidden __ieee754_log(x) - double x; -#endif +double attribute_hidden __ieee754_log(double x) { double hfsq,f,s,z,R,w,t1,t2,dk; int32_t k,hx,i,j; diff --git a/libm/e_log10.c b/libm/e_log10.c index 5b25c0f76..6cf3ea4ee 100644 --- a/libm/e_log10.c +++ b/libm/e_log10.c @@ -1,4 +1,3 @@ -/* @(#)e_log10.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: e_log10.c,v 1.9 1995/05/10 20:45:51 jtc Exp $"; -#endif - /* __ieee754_log10(x) * Return the base 10 logarithm of x * @@ -50,28 +45,15 @@ static char rcsid[] = "$NetBSD: e_log10.c,v 1.9 1995/05/10 20:45:51 jtc Exp $"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ static const double -#else -static double -#endif two54 = 1.80143985094819840000e+16, /* 0x43500000, 0x00000000 */ ivln10 = 4.34294481903251816668e-01, /* 0x3FDBCB7B, 0x1526E50E */ log10_2hi = 3.01029995663611771306e-01, /* 0x3FD34413, 0x509F6000 */ log10_2lo = 3.69423907715893078616e-13; /* 0x3D59FEF3, 0x11F12B36 */ -#ifdef __STDC__ -static const double zero = 0.0; -#else -static double zero = 0.0; -#endif +static const double zero = 0.0; -#ifdef __STDC__ - double attribute_hidden __ieee754_log10(double x) -#else - double attribute_hidden __ieee754_log10(x) - double x; -#endif +double attribute_hidden __ieee754_log10(double x) { double y,z; int32_t i,k,hx; diff --git a/libm/e_log2.c b/libm/e_log2.c index 894a96df0..6df88491e 100644 --- a/libm/e_log2.c +++ b/libm/e_log2.c @@ -57,11 +57,7 @@ #include "math.h" #include "math_private.h" -#ifdef __STDC__ static const double -#else -static double -#endif ln2 = 0.69314718055994530942, two54 = 1.80143985094819840000e+16, /* 43500000 00000000 */ Lg1 = 6.666666666666735130e-01, /* 3FE55555 55555593 */ @@ -72,18 +68,9 @@ Lg5 = 1.818357216161805012e-01, /* 3FC74664 96CB03DE */ Lg6 = 1.531383769920937332e-01, /* 3FC39A09 D078C69F */ Lg7 = 1.479819860511658591e-01; /* 3FC2F112 DF3E5244 */ -#ifdef __STDC__ static const double zero = 0.0; -#else -static double zero = 0.0; -#endif -#ifdef __STDC__ - double __ieee754_log2(double x) -#else - double __ieee754_log2(x) - double x; -#endif +double __ieee754_log2(double x) { double hfsq,f,s,z,R,w,t1,t2,dk; int32_t k,hx,i,j; diff --git a/libm/e_pow.c b/libm/e_pow.c index 53ec81329..08670cce3 100644 --- a/libm/e_pow.c +++ b/libm/e_pow.c @@ -1,4 +1,3 @@ -/* @(#)e_pow.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: e_pow.c,v 1.9 1995/05/12 04:57:32 jtc Exp $"; -#endif - /* __ieee754_pow(x,y) return x**y * * n @@ -62,12 +57,7 @@ static char rcsid[] = "$NetBSD: e_pow.c,v 1.9 1995/05/12 04:57:32 jtc Exp $"; #include "math.h" #include "math_private.h" - -#ifdef __STDC__ static const double -#else -static double -#endif bp[] = {1.0, 1.5,}, dp_h[] = { 0.0, 5.84962487220764160156e-01,}, /* 0x3FE2B803, 0x40000000 */ dp_l[] = { 0.0, 1.35003920212974897128e-08,}, /* 0x3E4CFDEB, 0x43CFD006 */ @@ -100,12 +90,7 @@ ivln2 = 1.44269504088896338700e+00, /* 0x3FF71547, 0x652B82FE =1/ln2 */ ivln2_h = 1.44269502162933349609e+00, /* 0x3FF71547, 0x60000000 =24b 1/ln2*/ ivln2_l = 1.92596299112661746887e-08; /* 0x3E54AE0B, 0xF85DDF44 =1/ln2 tail*/ -#ifdef __STDC__ - double attribute_hidden __ieee754_pow(double x, double y) -#else - double attribute_hidden __ieee754_pow(x,y) - double x, y; -#endif +double attribute_hidden __ieee754_pow(double x, double y) { double z,ax,z_h,z_l,p_h,p_l; double y1,t1,t2,r,s,t,u,v,w; diff --git a/libm/e_rem_pio2.c b/libm/e_rem_pio2.c index 92deaa33e..bdc4235b0 100644 --- a/libm/e_rem_pio2.c +++ b/libm/e_rem_pio2.c @@ -1,4 +1,3 @@ -/* @(#)e_rem_pio2.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: e_rem_pio2.c,v 1.8 1995/05/10 20:46:02 jtc Exp $"; -#endif - /* __ieee754_rem_pio2(x,y) * * return the remainder of x rem pi/2 in y[0]+y[1] @@ -23,15 +18,10 @@ static char rcsid[] = "$NetBSD: e_rem_pio2.c,v 1.8 1995/05/10 20:46:02 jtc Exp $ #include "math.h" #include "math_private.h" - /* * 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 0xA2F983, 0x6E4E44, 0x1529FC, 0x2757D1, 0xF534DD, 0xC0DB62, 0x95993C, 0x439041, 0xFE5163, 0xABDEBB, 0xC561B7, 0x246E3A, 0x424DD2, 0xE00649, 0x2EEA09, 0xD1921C, 0xFE1DEB, 0x1CB129, @@ -45,11 +35,7 @@ static int32_t two_over_pi[] = { 0x4D7327, 0x310606, 0x1556CA, 0x73A8C9, 0x60E27B, 0xC08C6B, }; -#ifdef __STDC__ static const int32_t npio2_hw[] = { -#else -static int32_t npio2_hw[] = { -#endif 0x3FF921FB, 0x400921FB, 0x4012D97C, 0x401921FB, 0x401F6A7A, 0x4022D97C, 0x4025FDBB, 0x402921FB, 0x402C463A, 0x402F6A7A, 0x4031475C, 0x4032D97C, 0x40346B9C, 0x4035FDBB, 0x40378FDB, 0x403921FB, 0x403AB41B, 0x403C463A, @@ -68,11 +54,7 @@ static int32_t npio2_hw[] = { * pio2_3t: pi/2 - (pio2_1+pio2_2+pio2_3) */ -#ifdef __STDC__ static const double -#else -static double -#endif zero = 0.00000000000000000000e+00, /* 0x00000000, 0x00000000 */ half = 5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */ two24 = 1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */ @@ -84,12 +66,7 @@ pio2_2t = 2.02226624879595063154e-21, /* 0x3BA3198A, 0x2E037073 */ pio2_3 = 2.02226624871116645580e-21, /* 0x3BA3198A, 0x2E000000 */ pio2_3t = 8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */ -#ifdef __STDC__ - int32_t attribute_hidden __ieee754_rem_pio2(double x, double *y) -#else - int32_t attribute_hidden __ieee754_rem_pio2(x,y) - double x,y[]; -#endif +int32_t attribute_hidden __ieee754_rem_pio2(double x, double *y) { double z=0.0,w,t,r,fn; double tx[3]; diff --git a/libm/e_remainder.c b/libm/e_remainder.c index 95eee7480..89c616686 100644 --- a/libm/e_remainder.c +++ b/libm/e_remainder.c @@ -1,4 +1,3 @@ -/* @(#)e_remainder.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: e_remainder.c,v 1.8 1995/05/10 20:46:05 jtc Exp $"; -#endif - /* __ieee754_remainder(x,p) * Return : * returns x REM p = x - [x/p]*p as if in infinite @@ -26,20 +21,9 @@ static char rcsid[] = "$NetBSD: e_remainder.c,v 1.8 1995/05/10 20:46:05 jtc Exp #include "math.h" #include "math_private.h" - -#ifdef __STDC__ static const double zero = 0.0; -#else -static double zero = 0.0; -#endif - -#ifdef __STDC__ - double attribute_hidden __ieee754_remainder(double x, double p) -#else - double attribute_hidden __ieee754_remainder(x,p) - double x,p; -#endif +double attribute_hidden __ieee754_remainder(double x, double p) { int32_t hx,hp; u_int32_t sx,lx,lp; diff --git a/libm/e_scalb.c b/libm/e_scalb.c index 33eaeeac6..f43fe6dd5 100644 --- a/libm/e_scalb.c +++ b/libm/e_scalb.c @@ -1,4 +1,3 @@ -/* @(#)e_scalb.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: e_scalb.c,v 1.6 1995/05/10 20:46:09 jtc Exp $"; -#endif - /* * __ieee754_scalb(x, fn) is provide for * passing various standard test suite. One @@ -23,21 +18,10 @@ static char rcsid[] = "$NetBSD: e_scalb.c,v 1.6 1995/05/10 20:46:09 jtc Exp $"; #include "math.h" #include "math_private.h" - #ifdef _SCALB_INT -#ifdef __STDC__ - double attribute_hidden __ieee754_scalb(double x, int fn) +double attribute_hidden __ieee754_scalb(double x, int fn) #else - double attribute_hidden __ieee754_scalb(x,fn) - double x; int fn; -#endif -#else -#ifdef __STDC__ - double attribute_hidden __ieee754_scalb(double x, double fn) -#else - double attribute_hidden __ieee754_scalb(x,fn) - double x, fn; -#endif +double attribute_hidden __ieee754_scalb(double x, double fn) #endif { #ifdef _SCALB_INT diff --git a/libm/e_sinh.c b/libm/e_sinh.c index ec2b1d865..7194b21b9 100644 --- a/libm/e_sinh.c +++ b/libm/e_sinh.c @@ -1,4 +1,3 @@ -/* @(#)e_sinh.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: e_sinh.c,v 1.7 1995/05/10 20:46:13 jtc Exp $"; -#endif - /* __ieee754_sinh(x) * Method : * mathematically sinh(x) if defined to be (exp(x)-exp(-x))/2 @@ -35,19 +30,9 @@ static char rcsid[] = "$NetBSD: e_sinh.c,v 1.7 1995/05/10 20:46:13 jtc Exp $"; #include "math.h" #include "math_private.h" - -#ifdef __STDC__ static const double one = 1.0, shuge = 1.0e307; -#else -static double one = 1.0, shuge = 1.0e307; -#endif -#ifdef __STDC__ - double attribute_hidden __ieee754_sinh(double x) -#else - double attribute_hidden __ieee754_sinh(x) - double x; -#endif +double attribute_hidden __ieee754_sinh(double x) { double t,w,h; int32_t ix,jx; diff --git a/libm/e_sqrt.c b/libm/e_sqrt.c index c8385d673..884214dff 100644 --- a/libm/e_sqrt.c +++ b/libm/e_sqrt.c @@ -1,4 +1,3 @@ -/* @(#)e_sqrt.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: e_sqrt.c,v 1.8 1995/05/10 20:46:17 jtc Exp $"; -#endif - /* __ieee754_sqrt(x) * Return correctly rounded sqrt. * ------------------------------------------ @@ -87,18 +82,9 @@ static char rcsid[] = "$NetBSD: e_sqrt.c,v 1.8 1995/05/10 20:46:17 jtc Exp $"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ -static const double one = 1.0, tiny=1.0e-300; -#else -static double one = 1.0, tiny=1.0e-300; -#endif - -#ifdef __STDC__ - double attribute_hidden __ieee754_sqrt(double x) -#else - double attribute_hidden __ieee754_sqrt(x) - double x; -#endif +static const double one = 1.0, tiny = 1.0e-300; + +double attribute_hidden __ieee754_sqrt(double x) { double z; int32_t sign = (int)0x80000000; diff --git a/libm/k_cos.c b/libm/k_cos.c index b2bbca0ca..ededf253a 100644 --- a/libm/k_cos.c +++ b/libm/k_cos.c @@ -1,4 +1,3 @@ -/* @(#)k_cos.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: k_cos.c,v 1.8 1995/05/10 20:46:22 jtc Exp $"; -#endif - /* * __kernel_cos( x, y ) * kernel cos function on [-pi/4, pi/4], pi/4 ~ 0.785398164 @@ -52,11 +47,7 @@ static char rcsid[] = "$NetBSD: k_cos.c,v 1.8 1995/05/10 20:46:22 jtc Exp $"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ static const double -#else -static double -#endif one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ C1 = 4.16666666666666019037e-02, /* 0x3FA55555, 0x5555554C */ C2 = -1.38888888888741095749e-03, /* 0xBF56C16C, 0x16C15177 */ @@ -65,12 +56,7 @@ C4 = -2.75573143513906633035e-07, /* 0xBE927E4F, 0x809C52AD */ C5 = 2.08757232129817482790e-09, /* 0x3E21EE9E, 0xBDB4B1C4 */ C6 = -1.13596475577881948265e-11; /* 0xBDA8FAE9, 0xBE8838D4 */ -#ifdef __STDC__ - double attribute_hidden __kernel_cos(double x, double y) -#else - double attribute_hidden __kernel_cos(x, y) - double x,y; -#endif +double attribute_hidden __kernel_cos(double x, double y) { double a,hz,z,r,qx; int32_t ix; diff --git a/libm/k_rem_pio2.c b/libm/k_rem_pio2.c index 8d1388de2..e34b2c8d4 100644 --- a/libm/k_rem_pio2.c +++ b/libm/k_rem_pio2.c @@ -1,4 +1,3 @@ -/* @(#)k_rem_pio2.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: k_rem_pio2.c,v 1.7 1995/05/10 20:46:25 jtc Exp $"; -#endif - /* * __kernel_rem_pio2(x,y,e0,nx,prec,ipio2) * double x[],y[]; int e0,nx,prec; int ipio2[]; @@ -133,18 +128,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 */ @@ -155,22 +141,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 attribute_hidden __kernel_rem_pio2(double *x, double *y, int e0, int nx, int prec, const int32_t *ipio2) -#else - int attribute_hidden __kernel_rem_pio2(x,y,e0,nx,prec,ipio2) - double x[], y[]; int e0,nx,prec; int32_t ipio2[]; -#endif +int attribute_hidden __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]; diff --git a/libm/k_sin.c b/libm/k_sin.c index 153f37ece..39a1bea91 100644 --- a/libm/k_sin.c +++ b/libm/k_sin.c @@ -1,4 +1,3 @@ -/* @(#)k_sin.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: k_sin.c,v 1.8 1995/05/10 20:46:31 jtc Exp $"; -#endif - /* __kernel_sin( x, y, iy) * kernel sin function on [-pi/4, pi/4], pi/4 ~ 0.7854 * Input x is assumed to be bounded by ~pi/4 in magnitude. @@ -45,11 +40,7 @@ static char rcsid[] = "$NetBSD: k_sin.c,v 1.8 1995/05/10 20:46:31 jtc Exp $"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ static const double -#else -static double -#endif half = 5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */ S1 = -1.66666666666666324348e-01, /* 0xBFC55555, 0x55555549 */ S2 = 8.33333333332248946124e-03, /* 0x3F811111, 0x1110F8A6 */ @@ -58,12 +49,7 @@ S4 = 2.75573137070700676789e-06, /* 0x3EC71DE3, 0x57B1FE7D */ S5 = -2.50507602534068634195e-08, /* 0xBE5AE5E6, 0x8A2B9CEB */ S6 = 1.58969099521155010221e-10; /* 0x3DE5D93A, 0x5ACFD57C */ -#ifdef __STDC__ - double attribute_hidden __kernel_sin(double x, double y, int iy) -#else - double attribute_hidden __kernel_sin(x, y, iy) - double x,y; int iy; /* iy=0 if y is zero */ -#endif +double attribute_hidden __kernel_sin(double x, double y, int iy) { double z,r,v; int32_t ix; diff --git a/libm/k_standard.c b/libm/k_standard.c index ed8062c3e..d9ab74579 100644 --- a/libm/k_standard.c +++ b/libm/k_standard.c @@ -1,4 +1,3 @@ -/* @(#)k_standard.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,17 +9,12 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: k_standard.c,v 1.6 1995/05/10 20:46:35 jtc Exp $"; -#endif - #include #include "math_private.h" #include #ifndef _IEEE_LIBM - #ifndef _USE_WRITE #include /* fputs(), stderr */ #define WRITE2(u,v) fputs(u, stderr) @@ -30,11 +24,7 @@ static char rcsid[] = "$NetBSD: k_standard.c,v 1.6 1995/05/10 20:46:35 jtc Exp $ #undef fflush #endif /* !defined(_USE_WRITE) */ -#ifdef __STDC__ static const double zero = 0.0; /* used as const */ -#else -static double zero = 0.0; /* used as const */ -#endif /* * Standard conformance (non-IEEE) on exception cases. @@ -83,13 +73,7 @@ static double zero = 0.0; /* used as const */ * 42-- pow(NaN,0.0) */ - -#ifdef __STDC__ - double __kernel_standard(double x, double y, int type) -#else - double __kernel_standard(x,y,type) - double x,y; int type; -#endif +double __kernel_standard(double x, double y, int type) { struct exception exc; #ifndef HUGE_VAL /* this is the only routine that uses HUGE_VAL */ diff --git a/libm/k_tan.c b/libm/k_tan.c index 95ec1510e..720b51f6d 100644 --- a/libm/k_tan.c +++ b/libm/k_tan.c @@ -1,4 +1,3 @@ -/* @(#)k_tan.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: k_tan.c,v 1.8 1995/05/10 20:46:37 jtc Exp $"; -#endif - /* __kernel_tan( x, y, k ) * kernel tan function on [-pi/4, pi/4], pi/4 ~ 0.7854 * Input x is assumed to be bounded by ~pi/4 in magnitude. @@ -51,12 +46,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 */ @@ -76,12 +66,7 @@ T[] = { 2.59073051863633712884e-05, /* 0x3EFB2A70, 0x74BF7AD4 */ }; -#ifdef __STDC__ - double attribute_hidden __kernel_tan(double x, double y, int iy) -#else - double attribute_hidden __kernel_tan(x, y, iy) - double x,y; int iy; -#endif +double attribute_hidden __kernel_tan(double x, double y, int iy) { double z,r,v,w,s; int32_t ix,hx; diff --git a/libm/math_private.h b/libm/math_private.h index f85db12a8..437371f34 100644 --- a/libm/math_private.h +++ b/libm/math_private.h @@ -9,11 +9,6 @@ * ==================================================== */ -/* - * from: @(#)fdlibm.h 5.1 93/09/24 - * $Id: math_private.h,v 1.3 2004/02/09 07:10:38 andersen Exp $ - */ - #ifndef _MATH_PRIVATE_H_ #define _MATH_PRIVATE_H_ diff --git a/libm/s_asinh.c b/libm/s_asinh.c index efdee84a6..7c79d6828 100644 --- a/libm/s_asinh.c +++ b/libm/s_asinh.c @@ -1,4 +1,3 @@ -/* @(#)s_asinh.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: s_asinh.c,v 1.9 1995/05/12 04:57:37 jtc Exp $"; -#endif - /* asinh(x) * Method : * Based on @@ -28,22 +23,12 @@ static char rcsid[] = "$NetBSD: s_asinh.c,v 1.9 1995/05/12 04:57: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 */ ln2 = 6.93147180559945286227e-01, /* 0x3FE62E42, 0xFEFA39EF */ huge= 1.00000000000000000000e+300; -#ifdef __STDC__ - double asinh(double x) -#else - double asinh(x) - double x; -#endif +double asinh(double x) { double t,w; int32_t hx,ix; diff --git a/libm/s_atan.c b/libm/s_atan.c index 7546ae9a0..08cfb08e8 100644 --- a/libm/s_atan.c +++ b/libm/s_atan.c @@ -1,4 +1,3 @@ -/* @(#)s_atan.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: s_atan.c,v 1.8 1995/05/10 20:46:45 jtc Exp $"; -#endif - /* atan(x) * Method * 1. Reduce x to positive by atan(x) = -atan(-x). @@ -37,34 +32,21 @@ static char rcsid[] = "$NetBSD: s_atan.c,v 1.8 1995/05/10 20:46:45 jtc Exp $"; #include "math.h" #include "math_private.h" - -#ifdef __STDC__ static const double atanhi[] = { -#else -static double atanhi[] = { -#endif 4.63647609000806093515e-01, /* atan(0.5)hi 0x3FDDAC67, 0x0561BB4F */ 7.85398163397448278999e-01, /* atan(1.0)hi 0x3FE921FB, 0x54442D18 */ 9.82793723247329054082e-01, /* atan(1.5)hi 0x3FEF730B, 0xD281F69B */ 1.57079632679489655800e+00, /* atan(inf)hi 0x3FF921FB, 0x54442D18 */ }; -#ifdef __STDC__ static const double atanlo[] = { -#else -static double atanlo[] = { -#endif 2.26987774529616870924e-17, /* atan(0.5)lo 0x3C7A2B7F, 0x222F65E2 */ 3.06161699786838301793e-17, /* atan(1.0)lo 0x3C81A626, 0x33145C07 */ 1.39033110312309984516e-17, /* atan(1.5)lo 0x3C700788, 0x7AF0CBBD */ 6.12323399573676603587e-17, /* atan(inf)lo 0x3C91A626, 0x33145C07 */ }; -#ifdef __STDC__ static const double aT[] = { -#else -static double aT[] = { -#endif 3.33333333333329318027e-01, /* 0x3FD55555, 0x5555550D */ -1.99999999998764832476e-01, /* 0xBFC99999, 0x9998EBC4 */ 1.42857142725034663711e-01, /* 0x3FC24924, 0x920083FF */ @@ -78,20 +60,11 @@ static double aT[] = { 1.62858201153657823623e-02, /* 0x3F90AD3A, 0xE322DA11 */ }; -#ifdef __STDC__ - static const double -#else - static double -#endif +static const double one = 1.0, huge = 1.0e300; -#ifdef __STDC__ - double atan(double x) -#else - double atan(x) - double x; -#endif +double atan(double x) { double w,s1,s2,z; int32_t ix,hx,id; diff --git a/libm/s_cbrt.c b/libm/s_cbrt.c index d47373e82..14e8ab02f 100644 --- a/libm/s_cbrt.c +++ b/libm/s_cbrt.c @@ -1,4 +1,3 @@ -/* @(#)s_cbrt.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,41 +9,24 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: s_cbrt.c,v 1.8 1995/05/10 20:46:49 jtc Exp $"; -#endif - #include "math.h" #include "math_private.h" /* cbrt(x) * Return cube root of x */ -#ifdef __STDC__ static const u_int32_t -#else -static u_int32_t -#endif B1 = 715094163, /* B1 = (682-0.03306235651)*2**20 */ B2 = 696219795; /* B2 = (664-0.03306235651)*2**20 */ -#ifdef __STDC__ static const double -#else -static double -#endif C = 5.42857142857142815906e-01, /* 19/35 = 0x3FE15F15, 0xF15F15F1 */ D = -7.05306122448979611050e-01, /* -864/1225 = 0xBFE691DE, 0x2532C834 */ E = 1.41428571428571436819e+00, /* 99/70 = 0x3FF6A0EA, 0x0EA0EA0F */ F = 1.60714285714285720630e+00, /* 45/28 = 0x3FF9B6DB, 0x6DB6DB6E */ G = 3.57142857142857150787e-01; /* 5/14 = 0x3FD6DB6D, 0xB6DB6DB7 */ -#ifdef __STDC__ - double cbrt(double x) -#else - double cbrt(x) - double x; -#endif +double cbrt(double x) { int32_t hx; double r,s,t=0.0,w; diff --git a/libm/s_ceil.c b/libm/s_ceil.c index c488510b1..ad0916eac 100644 --- a/libm/s_ceil.c +++ b/libm/s_ceil.c @@ -1,4 +1,3 @@ -/* @(#)s_ceil.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: s_ceil.c,v 1.8 1995/05/10 20:46:53 jtc Exp $"; -#endif - /* * ceil(x) * Return x rounded toward -inf to integral value @@ -29,18 +24,9 @@ static char rcsid[] = "$NetBSD: s_ceil.c,v 1.8 1995/05/10 20:46:53 jtc Exp $"; #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 ceil(double x) -#else - double ceil(x) - double x; -#endif +double ceil(double x) { int32_t i0,i1,j0; u_int32_t i,j; diff --git a/libm/s_copysign.c b/libm/s_copysign.c index cb2e0c9ca..33e153167 100644 --- a/libm/s_copysign.c +++ b/libm/s_copysign.c @@ -1,4 +1,3 @@ -/* @(#)s_copysign.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: s_copysign.c,v 1.8 1995/05/10 20:46:57 jtc Exp $"; -#endif - /* * copysign(double x, double y) * copysign(x,y) returns a value with the magnitude of x and @@ -23,12 +18,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); diff --git a/libm/s_cos.c b/libm/s_cos.c index 74420fdfc..c4b1f8643 100644 --- a/libm/s_cos.c +++ b/libm/s_cos.c @@ -1,4 +1,3 @@ -/* @(#)s_cos.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: s_cos.c,v 1.7 1995/05/10 20:47:02 jtc Exp $"; -#endif - /* cos(x) * Return cosine function of x. * @@ -48,12 +43,7 @@ static char rcsid[] = "$NetBSD: s_cos.c,v 1.7 1995/05/10 20:47:02 jtc Exp $"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ - double cos(double x) -#else - double cos(x) - double x; -#endif +double cos(double x) { double y[2],z=0.0; int32_t n, ix; diff --git a/libm/s_erf.c b/libm/s_erf.c index 0996a396f..27083d240 100644 --- a/libm/s_erf.c +++ b/libm/s_erf.c @@ -1,4 +1,3 @@ -/* @(#)s_erf.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: s_erf.c,v 1.8 1995/05/10 20:47:05 jtc Exp $"; -#endif - /* double erf(double x) * double erfc(double x) * x @@ -108,16 +103,10 @@ static char rcsid[] = "$NetBSD: s_erf.c,v 1.8 1995/05/10 20:47:05 jtc Exp $"; * erfc/erf(NaN) is NaN */ - #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 */ @@ -192,12 +181,7 @@ sb5 = 2.55305040643316442583e+03, /* 0x40A3F219, 0xCEDF3BE6 */ sb6 = 4.74528541206955367215e+02, /* 0x407DA874, 0xE79FE763 */ sb7 = -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; @@ -249,12 +233,7 @@ sb7 = -2.24409524465858183362e+01; /* 0xC03670E2, 0x42712D62 */ } libm_hidden_def(erf) -#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; diff --git a/libm/s_expm1.c b/libm/s_expm1.c index 4eab15c43..8e51ae748 100644 --- a/libm/s_expm1.c +++ b/libm/s_expm1.c @@ -1,4 +1,3 @@ -/* @(#)s_expm1.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: s_expm1.c,v 1.8 1995/05/10 20:47:09 jtc Exp $"; -#endif - /* expm1(x) * Returns exp(x)-1, the exponential of x minus 1. * @@ -112,11 +107,7 @@ static char rcsid[] = "$NetBSD: s_expm1.c,v 1.8 1995/05/10 20:47:09 jtc Exp $"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ static const double -#else -static double -#endif one = 1.0, huge = 1.0e+300, tiny = 1.0e-300, @@ -131,12 +122,7 @@ Q3 = -7.93650757867487942473e-05, /* BF14CE19 9EAADBB7 */ Q4 = 4.00821782732936239552e-06, /* 3ED0CFCA 86E65239 */ Q5 = -2.01099218183624371326e-07; /* BE8AFDB7 6E09C32D */ -#ifdef __STDC__ - double expm1(double x) -#else - double expm1(x) - double x; -#endif +double expm1(double x) { double y,hi,lo,c=0.0,t,e,hxs,hfx,r1; int32_t k,xsb; diff --git a/libm/s_fabs.c b/libm/s_fabs.c index 942a9b802..d2c647ff3 100644 --- a/libm/s_fabs.c +++ b/libm/s_fabs.c @@ -1,4 +1,3 @@ -/* @(#)s_fabs.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: s_fabs.c,v 1.7 1995/05/10 20:47:13 jtc Exp $"; -#endif - /* * fabs(x) returns the absolute value of x. */ @@ -24,12 +19,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); diff --git a/libm/s_fdim.c b/libm/s_fdim.c index 98f140d17..6249219c8 100644 --- a/libm/s_fdim.c +++ b/libm/s_fdim.c @@ -7,13 +7,7 @@ #include "math.h" #include "math_private.h" -#ifdef __STDC__ - double fdim(double x, double y) -#else - double fdim(x,y) - double x; - double y; -#endif +double fdim(double x, double y) { int c = __fpclassify(x); if (c == FP_NAN || c == FP_INFINITE) diff --git a/libm/s_finite.c b/libm/s_finite.c index 357c3d4af..50fc11b50 100644 --- a/libm/s_finite.c +++ b/libm/s_finite.c @@ -1,4 +1,3 @@ -/* @(#)s_finite.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. diff --git a/libm/s_floor.c b/libm/s_floor.c index c9bc2a0d0..91f1879be 100644 --- a/libm/s_floor.c +++ b/libm/s_floor.c @@ -1,4 +1,3 @@ -/* @(#)s_floor.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: s_floor.c,v 1.8 1995/05/10 20:47:20 jtc Exp $"; -#endif - /* * floor(x) * Return x rounded toward -inf to integral value @@ -29,18 +24,9 @@ static char rcsid[] = "$NetBSD: s_floor.c,v 1.8 1995/05/10 20:47:20 jtc Exp $"; #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; diff --git a/libm/s_fmax.c b/libm/s_fmax.c index e3cda763f..21dfaa981 100644 --- a/libm/s_fmax.c +++ b/libm/s_fmax.c @@ -7,13 +7,7 @@ #include "math.h" #include "math_private.h" -#ifdef __STDC__ - double fmax(double x, double y) -#else - double fmax(x,y) - double x; - double y; -#endif +double fmax(double x, double y) { if (__fpclassify(x) == FP_NAN) return x; diff --git a/libm/s_fmin.c b/libm/s_fmin.c index 4d2a0cf56..674d9a56b 100644 --- a/libm/s_fmin.c +++ b/libm/s_fmin.c @@ -7,13 +7,7 @@ #include "math.h" #include "math_private.h" -#ifdef __STDC__ - double fmin(double x, double y) -#else - double fmin(x,y) - double x; - double y; -#endif +double fmin(double x, double y) { if (__fpclassify(x) == FP_NAN) return x; diff --git a/libm/s_fpclassify.c b/libm/s_fpclassify.c index f2d6736e3..a05cd563e 100644 --- a/libm/s_fpclassify.c +++ b/libm/s_fpclassify.c @@ -22,8 +22,7 @@ #include "math_private.h" -int -__fpclassify (double x) +int __fpclassify(double x) { u_int32_t hx, lx; int retval = FP_NORMAL; diff --git a/libm/s_frexp.c b/libm/s_frexp.c index 9ec46244a..212ec47af 100644 --- a/libm/s_frexp.c +++ b/libm/s_frexp.c @@ -1,4 +1,3 @@ -/* @(#)s_frexp.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: s_frexp.c,v 1.9 1995/05/10 20:47:24 jtc Exp $"; -#endif - /* * for non-zero x * x = frexp(arg,&exp); @@ -27,19 +22,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); diff --git a/libm/s_ilogb.c b/libm/s_ilogb.c index 2617757fd..ce3029667 100644 --- a/libm/s_ilogb.c +++ b/libm/s_ilogb.c @@ -1,4 +1,3 @@ -/* @(#)s_ilogb.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: s_ilogb.c,v 1.9 1995/05/10 20:47:28 jtc Exp $"; -#endif - /* ilogb(double x) * return the binary exponent of non-zero x * ilogb(0) = 0x80000001 @@ -23,12 +18,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; diff --git a/libm/s_isinf.c b/libm/s_isinf.c index b73aa6696..62e5263bb 100644 --- a/libm/s_isinf.c +++ b/libm/s_isinf.c @@ -12,8 +12,7 @@ #include "math.h" #include "math_private.h" -int -__isinf (double x) +int __isinf(double x) { int32_t hx,lx; EXTRACT_WORDS(hx,lx,x); diff --git a/libm/s_isinff.c b/libm/s_isinff.c index e25912834..6727f0464 100644 --- a/libm/s_isinff.c +++ b/libm/s_isinff.c @@ -11,8 +11,7 @@ #include "math.h" #include "math_private.h" -int -__isinff (float x) +int __isinff (float x) { int32_t ix,t; GET_FLOAT_WORD(ix,x); diff --git a/libm/s_isnan.c b/libm/s_isnan.c index 51ed94e04..1bc49cb02 100644 --- a/libm/s_isnan.c +++ b/libm/s_isnan.c @@ -1,4 +1,3 @@ -/* @(#)s_isnan.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. diff --git a/libm/s_ldexp.c b/libm/s_ldexp.c index 02dae6fcf..1b681cb81 100644 --- a/libm/s_ldexp.c +++ b/libm/s_ldexp.c @@ -1,4 +1,3 @@ -/* @(#)s_ldexp.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,21 +9,11 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: s_ldexp.c,v 1.6 1995/05/10 20:47:40 jtc Exp $"; -#endif - #include "math.h" #include "math_private.h" #include - -#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(!isfinite(value)||value==0.0) return value; value = scalbn(value,exp); diff --git a/libm/s_lib_version.c b/libm/s_lib_version.c index fde8e3bf6..e3119423f 100644 --- a/libm/s_lib_version.c +++ b/libm/s_lib_version.c @@ -1,4 +1,3 @@ -/* @(#)s_lib_ver.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: s_lib_version.c,v 1.6 1995/05/10 20:47:44 jtc Exp $"; -#endif - /* * MACRO for standards */ diff --git a/libm/s_llround.c b/libm/s_llround.c index a549ccc8c..8263b03de 100644 --- a/libm/s_llround.c +++ b/libm/s_llround.c @@ -19,7 +19,6 @@ 02111-1307 USA. */ #include - #include "math_private.h" long long int diff --git a/libm/s_log1p.c b/libm/s_log1p.c index 695019a9e..454056300 100644 --- a/libm/s_log1p.c +++ b/libm/s_log1p.c @@ -1,4 +1,3 @@ -/* @(#)s_log1p.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: s_log1p.c,v 1.8 1995/05/10 20:47:46 jtc Exp $"; -#endif - /* double log1p(double x) * * Method : @@ -82,11 +77,7 @@ static char rcsid[] = "$NetBSD: s_log1p.c,v 1.8 1995/05/10 20:47:46 jtc Exp $"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ static const double -#else -static double -#endif ln2_hi = 6.93147180369123816490e-01, /* 3fe62e42 fee00000 */ ln2_lo = 1.90821492927058770002e-10, /* 3dea39ef 35793c76 */ two54 = 1.80143985094819840000e+16, /* 43500000 00000000 */ @@ -98,18 +89,9 @@ Lp5 = 1.818357216161805012e-01, /* 3FC74664 96CB03DE */ Lp6 = 1.531383769920937332e-01, /* 3FC39A09 D078C69F */ Lp7 = 1.479819860511658591e-01; /* 3FC2F112 DF3E5244 */ -#ifdef __STDC__ static const double zero = 0.0; -#else -static double zero = 0.0; -#endif -#ifdef __STDC__ - double log1p(double x) -#else - double log1p(x) - double x; -#endif +double log1p(double x) { double hfsq,f=0,c=0,s,z,R,u; int32_t k,hx,hu=0,ax; diff --git a/libm/s_logb.c b/libm/s_logb.c index 173b47764..9016b9721 100644 --- a/libm/s_logb.c +++ b/libm/s_logb.c @@ -1,4 +1,3 @@ -/* @(#)s_logb.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: s_logb.c,v 1.8 1995/05/10 20:47:50 jtc Exp $"; -#endif - /* * double logb(x) * IEEE 754 logb. Included to pass IEEE test suite. Not recommend. @@ -23,13 +18,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); diff --git a/libm/s_lround.c b/libm/s_lround.c index 056a48724..acf8fb612 100644 --- a/libm/s_lround.c +++ b/libm/s_lround.c @@ -19,7 +19,6 @@ 02111-1307 USA. */ #include - #include "math_private.h" long int diff --git a/libm/s_matherr.c b/libm/s_matherr.c index fda4e191b..3ab059362 100644 --- a/libm/s_matherr.c +++ b/libm/s_matherr.c @@ -1,4 +1,3 @@ -/* @(#)s_matherr.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,21 +9,12 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: s_matherr.c,v 1.6 1995/05/10 20:47:53 jtc Exp $"; -#endif - #include "math.h" #include "math_private.h" #ifndef _IEEE_LIBM -#ifdef __STDC__ int matherr(struct exception *x) -#else - int matherr(x) - struct exception *x; -#endif { int n=0; if(x->arg1!=x->arg1) return 0; diff --git a/libm/s_modf.c b/libm/s_modf.c index 24369c02d..26c2f1cd5 100644 --- a/libm/s_modf.c +++ b/libm/s_modf.c @@ -1,4 +1,3 @@ -/* @(#)s_modf.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: s_modf.c,v 1.8 1995/05/10 20:47:55 jtc Exp $"; -#endif - /* * modf(double x, double *iptr) * return fraction part of x, and return x's integral part in *iptr. @@ -27,18 +22,9 @@ static char rcsid[] = "$NetBSD: s_modf.c,v 1.8 1995/05/10 20:47:55 jtc Exp $"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ static const double one = 1.0; -#else -static double one = 1.0; -#endif -#ifdef __STDC__ - double modf(double x, double *iptr) -#else - double modf(x, iptr) - double x,*iptr; -#endif +double modf(double x, double *iptr) { int32_t i0,i1,j0; u_int32_t i; diff --git a/libm/s_nearbyint.c b/libm/s_nearbyint.c index 52ebbdba1..1c285051b 100644 --- a/libm/s_nearbyint.c +++ b/libm/s_nearbyint.c @@ -12,12 +12,7 @@ #include "math.h" #include "math_private.h" -#ifdef __STDC__ - double nearbyint(double x) -#else - double nearbyint(x) - double x; -#endif +double nearbyint(double x) { return rint(x); } diff --git a/libm/s_nextafter.c b/libm/s_nextafter.c index 1034e3290..ee4621cc7 100644 --- a/libm/s_nextafter.c +++ b/libm/s_nextafter.c @@ -1,4 +1,3 @@ -/* @(#)s_nextafter.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: s_nextafter.c,v 1.8 1995/05/10 20:47:58 jtc Exp $"; -#endif - /* IEEE functions * nextafter(x,y) * return the next machine floating-point number of x in the @@ -24,12 +19,7 @@ static char rcsid[] = "$NetBSD: s_nextafter.c,v 1.8 1995/05/10 20:47:58 jtc Exp #include "math.h" #include "math_private.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; diff --git a/libm/s_remquo.c b/libm/s_remquo.c index 9cbf8c4ab..f72c56f3f 100644 --- a/libm/s_remquo.c +++ b/libm/s_remquo.c @@ -7,13 +7,7 @@ #include "math.h" #include "math_private.h" -#ifdef __STDC__ - double remquo(double x, double y, int *quo) /* wrapper remquo */ -#else - double remquo(x,y,quo) /* wrapper remquo */ - double x,y; - int *quo; -#endif +double remquo(double x, double y, int *quo) /* wrapper remquo */ { int signx, signy, signres; int mswx; diff --git a/libm/s_rint.c b/libm/s_rint.c index d20f1bd3f..641e57571 100644 --- a/libm/s_rint.c +++ b/libm/s_rint.c @@ -1,4 +1,3 @@ -/* @(#)s_rint.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: s_rint.c,v 1.8 1995/05/10 20:48:04 jtc Exp $"; -#endif - /* * rint(x) * Return x rounded to integral value according to the prevailing @@ -27,22 +22,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 rint(double x) -#else - double rint(x) - double x; -#endif +double rint(double x) { int32_t i0,j0,sx; u_int32_t i,i1; diff --git a/libm/s_round.c b/libm/s_round.c index 7965c6f68..b3e226308 100644 --- a/libm/s_round.c +++ b/libm/s_round.c @@ -19,10 +19,8 @@ 02111-1307 USA. */ #include - #include "math_private.h" - static const double huge = 1.0e300; double diff --git a/libm/s_scalbln.c b/libm/s_scalbln.c index d2ea79153..3d0ff2f77 100644 --- a/libm/s_scalbln.c +++ b/libm/s_scalbln.c @@ -1,4 +1,3 @@ -/* @(#)s_scalbn.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -20,22 +19,13 @@ #include "math.h" #include "math_private.h" -#ifdef __STDC__ static const double -#else -static double -#endif two54 = 1.80143985094819840000e+16, /* 0x43500000, 0x00000000 */ twom54 = 5.55111512312578270212e-17, /* 0x3C900000, 0x00000000 */ huge = 1.0e+300, tiny = 1.0e-300; -#ifdef __STDC__ - double scalbln (double x, long int n) -#else - double scalbln (x,n) - double x; long int n; -#endif +double scalbln(double x, long int n) { int32_t k,hx,lx; EXTRACT_WORDS(hx,lx,x); diff --git a/libm/s_scalbn.c b/libm/s_scalbn.c index 2c5ada3fc..c98ea9d1c 100644 --- a/libm/s_scalbn.c +++ b/libm/s_scalbn.c @@ -1,4 +1,3 @@ -/* @(#)s_scalbn.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: s_scalbn.c,v 1.8 1995/05/10 20:48:08 jtc Exp $"; -#endif - /* * scalbn (double x, int n) * scalbn(x,n) returns x* 2**n computed by exponent @@ -24,23 +19,13 @@ static char rcsid[] = "$NetBSD: s_scalbn.c,v 1.8 1995/05/10 20:48:08 jtc Exp $"; #include "math.h" #include "math_private.h" - -#ifdef __STDC__ static const double -#else -static double -#endif two54 = 1.80143985094819840000e+16, /* 0x43500000, 0x00000000 */ twom54 = 5.55111512312578270212e-17, /* 0x3C900000, 0x00000000 */ huge = 1.0e+300, tiny = 1.0e-300; -#ifdef __STDC__ - double scalbn (double x, int n) -#else - double scalbn (x,n) - double x; int n; -#endif +double scalbn(double x, int n) { int32_t k,hx,lx; EXTRACT_WORDS(hx,lx,x); diff --git a/libm/s_significand.c b/libm/s_significand.c index 100ac0889..8c74ce24b 100644 --- a/libm/s_significand.c +++ b/libm/s_significand.c @@ -1,4 +1,3 @@ -/* @(#)s_signif.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: s_significand.c,v 1.6 1995/05/10 20:48:11 jtc Exp $"; -#endif - /* * significand(x) computes just * scalb(x, (double) -ilogb(x)), @@ -23,13 +18,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)); } diff --git a/libm/s_sin.c b/libm/s_sin.c index c14709b28..03867e773 100644 --- a/libm/s_sin.c +++ b/libm/s_sin.c @@ -1,4 +1,3 @@ -/* @(#)s_sin.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: s_sin.c,v 1.7 1995/05/10 20:48:15 jtc Exp $"; -#endif - /* sin(x) * Return sine function of x. * @@ -48,12 +43,7 @@ static char rcsid[] = "$NetBSD: s_sin.c,v 1.7 1995/05/10 20:48:15 jtc Exp $"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ - double sin(double x) -#else - double sin(x) - double x; -#endif +double sin(double x) { double y[2],z=0.0; int32_t n, ix; diff --git a/libm/s_tan.c b/libm/s_tan.c index 26bb39f9b..5a2bc930c 100644 --- a/libm/s_tan.c +++ b/libm/s_tan.c @@ -1,4 +1,3 @@ -/* @(#)s_tan.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: s_tan.c,v 1.7 1995/05/10 20:48:18 jtc Exp $"; -#endif - /* tan(x) * Return tangent function of x. * @@ -47,12 +42,7 @@ static char rcsid[] = "$NetBSD: s_tan.c,v 1.7 1995/05/10 20:48:18 jtc Exp $"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ - double tan(double x) -#else - double tan(x) - double x; -#endif +double tan(double x) { double y[2],z=0.0; int32_t n, ix; diff --git a/libm/s_tanh.c b/libm/s_tanh.c index edadbfe21..89ee2718b 100644 --- a/libm/s_tanh.c +++ b/libm/s_tanh.c @@ -1,4 +1,3 @@ -/* @(#)s_tanh.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: s_tanh.c,v 1.7 1995/05/10 20:48:22 jtc Exp $"; -#endif - /* Tanh(x) * Return the Hyperbolic Tangent of x * @@ -41,19 +36,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; diff --git a/libm/s_trunc.c b/libm/s_trunc.c index 6e5678be1..eb4f6a8f8 100644 --- a/libm/s_trunc.c +++ b/libm/s_trunc.c @@ -19,10 +19,8 @@ 02111-1307 USA. */ #include - #include "math_private.h" - double trunc (double x) { diff --git a/libm/w_acos.c b/libm/w_acos.c index f93f6bb4d..2413d87d9 100644 --- a/libm/w_acos.c +++ b/libm/w_acos.c @@ -1,4 +1,3 @@ -/* @(#)w_acos.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: w_acos.c,v 1.6 1995/05/10 20:48:26 jtc Exp $"; -#endif - /* * wrap_acos(x) */ @@ -21,12 +16,7 @@ static char rcsid[] = "$NetBSD: w_acos.c,v 1.6 1995/05/10 20:48:26 jtc Exp $"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ - double acos(double x) /* wrapper acos */ -#else - double acos(x) /* wrapper acos */ - double x; -#endif +double acos(double x) /* wrapper acos */ { #ifdef _IEEE_LIBM return __ieee754_acos(x); diff --git a/libm/w_acosh.c b/libm/w_acosh.c index 3268218bf..98dc1b3af 100644 --- a/libm/w_acosh.c +++ b/libm/w_acosh.c @@ -1,4 +1,3 @@ -/* @(#)w_acosh.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: w_acosh.c,v 1.6 1995/05/10 20:48:31 jtc Exp $"; -#endif - /* * wrapper acosh(x) */ @@ -21,12 +16,7 @@ static char rcsid[] = "$NetBSD: w_acosh.c,v 1.6 1995/05/10 20:48:31 jtc Exp $"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ - double acosh(double x) /* wrapper acosh */ -#else - double acosh(x) /* wrapper acosh */ - double x; -#endif +double acosh(double x) /* wrapper acosh */ { #ifdef _IEEE_LIBM return __ieee754_acosh(x); diff --git a/libm/w_asin.c b/libm/w_asin.c index a028a1d34..b4575654e 100644 --- a/libm/w_asin.c +++ b/libm/w_asin.c @@ -1,4 +1,3 @@ -/* @(#)w_asin.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,25 +9,14 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: w_asin.c,v 1.6 1995/05/10 20:48:35 jtc Exp $"; -#endif - /* * wrapper asin(x) */ - #include "math.h" #include "math_private.h" - -#ifdef __STDC__ - double asin(double x) /* wrapper asin */ -#else - double asin(x) /* wrapper asin */ - double x; -#endif +double asin(double x) /* wrapper asin */ { #ifdef _IEEE_LIBM return __ieee754_asin(x); diff --git a/libm/w_atan2.c b/libm/w_atan2.c index 6a13d2b3c..a85e2047b 100644 --- a/libm/w_atan2.c +++ b/libm/w_atan2.c @@ -1,4 +1,3 @@ -/* @(#)w_atan2.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,22 +9,14 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: w_atan2.c,v 1.6 1995/05/10 20:48:39 jtc Exp $"; -#endif - /* * wrapper atan2(y,x) */ + #include "math.h" #include "math_private.h" -#ifdef __STDC__ - double atan2(double y, double x) /* wrapper atan2 */ -#else - double atan2(y,x) /* wrapper atan2 */ - double y,x; -#endif +double atan2(double y, double x) /* wrapper atan2 */ { #ifdef _IEEE_LIBM return __ieee754_atan2(y,x); diff --git a/libm/w_atanh.c b/libm/w_atanh.c index 9839313ad..6dffe6ad6 100644 --- a/libm/w_atanh.c +++ b/libm/w_atanh.c @@ -1,4 +1,3 @@ -/* @(#)w_atanh.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: w_atanh.c,v 1.6 1995/05/10 20:48:43 jtc Exp $"; -#endif - /* * wrapper atanh(x) */ @@ -21,12 +16,7 @@ static char rcsid[] = "$NetBSD: w_atanh.c,v 1.6 1995/05/10 20:48:43 jtc Exp $"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ - double atanh(double x) /* wrapper atanh */ -#else - double atanh(x) /* wrapper atanh */ - double x; -#endif +double atanh(double x) /* wrapper atanh */ { #ifdef _IEEE_LIBM return __ieee754_atanh(x); diff --git a/libm/w_cabs.c b/libm/w_cabs.c index d2a54cd9f..4044f4bff 100644 --- a/libm/w_cabs.c +++ b/libm/w_cabs.c @@ -8,7 +8,6 @@ #include #include - double cabs(double _Complex z) { return hypot(__real__ z, __imag__ z); diff --git a/libm/w_cosh.c b/libm/w_cosh.c index 0766e373d..d37952447 100644 --- a/libm/w_cosh.c +++ b/libm/w_cosh.c @@ -1,4 +1,3 @@ -/* @(#)w_cosh.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: w_cosh.c,v 1.6 1995/05/10 20:48:47 jtc Exp $"; -#endif - /* * wrapper cosh(x) */ @@ -21,12 +16,7 @@ static char rcsid[] = "$NetBSD: w_cosh.c,v 1.6 1995/05/10 20:48:47 jtc Exp $"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ - double cosh(double x) /* wrapper cosh */ -#else - double cosh(x) /* wrapper cosh */ - double x; -#endif +double cosh(double x) /* wrapper cosh */ { #ifdef _IEEE_LIBM return __ieee754_cosh(x); diff --git a/libm/w_drem.c b/libm/w_drem.c index 4f9127b1e..046e17756 100644 --- a/libm/w_drem.c +++ b/libm/w_drem.c @@ -7,7 +7,6 @@ #include - double drem(double x, double y) { return remainder(x, y); diff --git a/libm/w_exp.c b/libm/w_exp.c index 067279664..bd9af7ae5 100644 --- a/libm/w_exp.c +++ b/libm/w_exp.c @@ -1,4 +1,3 @@ -/* @(#)w_exp.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: w_exp.c,v 1.6 1995/05/10 20:48:51 jtc Exp $"; -#endif - /* * wrapper exp(x) */ @@ -21,24 +16,15 @@ static char rcsid[] = "$NetBSD: w_exp.c,v 1.6 1995/05/10 20:48:51 jtc Exp $"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ -static const double -#else -static double -#endif -o_threshold= 7.09782712893383973096e+02, /* 0x40862E42, 0xFEFA39EF */ -u_threshold= -7.45133219101941108420e+02; /* 0xc0874910, 0xD52D3051 */ - -#ifdef __STDC__ - double exp(double x) /* wrapper exp */ -#else - double exp(x) /* wrapper exp */ - double x; -#endif +double exp(double x) /* wrapper exp */ { #ifdef _IEEE_LIBM return __ieee754_exp(x); #else + static const double + o_threshold= 7.09782712893383973096e+02, /* 0x40862E42, 0xFEFA39EF */ + u_threshold= -7.45133219101941108420e+02; /* 0xc0874910, 0xD52D3051 */ + double z; z = __ieee754_exp(x); if(_LIB_VERSION == _IEEE_) return z; diff --git a/libm/w_exp2.c b/libm/w_exp2.c index 604d6ecff..20fb9c28e 100644 --- a/libm/w_exp2.c +++ b/libm/w_exp2.c @@ -1,5 +1,3 @@ - -/* @(#)w_exp2.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -14,12 +12,7 @@ #include "math.h" #include "math_private.h" -#ifdef __STDC__ - double exp2(double x) -#else - double exp2(x) - double x; -#endif +double exp2(double x) { return pow(2.0, x); } diff --git a/libm/w_fmod.c b/libm/w_fmod.c index ce7d78469..ba0897d14 100644 --- a/libm/w_fmod.c +++ b/libm/w_fmod.c @@ -1,4 +1,3 @@ -/* @(#)w_fmod.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: w_fmod.c,v 1.6 1995/05/10 20:48:55 jtc Exp $"; -#endif - /* * wrapper fmod(x,y) */ @@ -21,12 +16,7 @@ static char rcsid[] = "$NetBSD: w_fmod.c,v 1.6 1995/05/10 20:48:55 jtc Exp $"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ - double fmod(double x, double y) /* wrapper fmod */ -#else - double fmod(x,y) /* wrapper fmod */ - double x,y; -#endif +double fmod(double x, double y) /* wrapper fmod */ { #ifdef _IEEE_LIBM return __ieee754_fmod(x,y); diff --git a/libm/w_gamma.c b/libm/w_gamma.c index 5d8bca0ee..4b23392ed 100644 --- a/libm/w_gamma.c +++ b/libm/w_gamma.c @@ -1,4 +1,3 @@ -/* @(#)w_gamma.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: w_gamma.c,v 1.7 1995/11/20 22:06:43 jtc Exp $"; -#endif - /* double gamma(double x) * Return the logarithm of the Gamma function of x. * @@ -24,12 +19,7 @@ static char rcsid[] = "$NetBSD: w_gamma.c,v 1.7 1995/11/20 22:06:43 jtc Exp $"; #include "math_private.h" libm_hidden_proto(signgam) -#ifdef __STDC__ - double gamma(double x) -#else - double gamma(x) - double x; -#endif +double gamma(double x) { #ifdef _IEEE_LIBM return __ieee754_lgamma_r(x,&signgam); diff --git a/libm/w_gamma_r.c b/libm/w_gamma_r.c index a8eb2994d..04a843ca7 100644 --- a/libm/w_gamma_r.c +++ b/libm/w_gamma_r.c @@ -1,4 +1,3 @@ -/* @(#)wr_gamma.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: w_gamma_r.c,v 1.7 1995/11/20 22:06:45 jtc Exp $"; -#endif - /* * wrapper double gamma_r(double x, int *signgamp) */ @@ -21,15 +16,10 @@ static char rcsid[] = "$NetBSD: w_gamma_r.c,v 1.7 1995/11/20 22:06:45 jtc Exp $" #include "math.h" #include "math_private.h" - double gamma_r(double x, int *signgamp); libm_hidden_proto(gamma_r) -#ifdef __STDC__ - double gamma_r(double x, int *signgamp) /* wrapper lgamma_r */ -#else - double gamma_r(x,signgamp) /* wrapper lgamma_r */ - double x; int *signgamp; -#endif + +double gamma_r(double x, int *signgamp) /* wrapper lgamma_r */ { #ifdef _IEEE_LIBM return __ieee754_lgamma_r(x,signgamp); diff --git a/libm/w_hypot.c b/libm/w_hypot.c index a6abb8032..02e8977dc 100644 --- a/libm/w_hypot.c +++ b/libm/w_hypot.c @@ -1,4 +1,3 @@ -/* @(#)w_hypot.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: w_hypot.c,v 1.6 1995/05/10 20:49:07 jtc Exp $"; -#endif - /* * wrapper hypot(x,y) */ @@ -21,12 +16,7 @@ static char rcsid[] = "$NetBSD: w_hypot.c,v 1.6 1995/05/10 20:49:07 jtc Exp $"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ - double hypot(double x, double y)/* wrapper hypot */ -#else - double hypot(x,y) /* wrapper hypot */ - double x,y; -#endif +double hypot(double x, double y)/* wrapper hypot */ { #ifdef _IEEE_LIBM return __ieee754_hypot(x,y); diff --git a/libm/w_j0.c b/libm/w_j0.c index 61f4f20fc..2cd03082d 100644 --- a/libm/w_j0.c +++ b/libm/w_j0.c @@ -1,4 +1,3 @@ -/* @(#)w_j0.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: w_j0.c,v 1.6 1995/05/10 20:49:11 jtc Exp $"; -#endif - /* * wrapper j0(double x), y0(double x) */ @@ -21,12 +16,7 @@ static char rcsid[] = "$NetBSD: w_j0.c,v 1.6 1995/05/10 20:49:11 jtc Exp $"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ - double j0(double x) /* wrapper j0 */ -#else - double j0(x) /* wrapper j0 */ - double x; -#endif +double j0(double x) /* wrapper j0 */ { #ifdef _IEEE_LIBM return __ieee754_j0(x); @@ -40,12 +30,7 @@ static char rcsid[] = "$NetBSD: w_j0.c,v 1.6 1995/05/10 20:49:11 jtc Exp $"; #endif } -#ifdef __STDC__ - double y0(double x) /* wrapper y0 */ -#else - double y0(x) /* wrapper y0 */ - double x; -#endif +double y0(double x) /* wrapper y0 */ { #ifdef _IEEE_LIBM return __ieee754_y0(x); diff --git a/libm/w_j1.c b/libm/w_j1.c index 389dc156c..18af1126b 100644 --- a/libm/w_j1.c +++ b/libm/w_j1.c @@ -1,4 +1,3 @@ -/* @(#)w_j1.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: w_j1.c,v 1.6 1995/05/10 20:49:15 jtc Exp $"; -#endif - /* * wrapper of j1,y1 */ @@ -21,12 +16,7 @@ static char rcsid[] = "$NetBSD: w_j1.c,v 1.6 1995/05/10 20:49:15 jtc Exp $"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ - double j1(double x) /* wrapper j1 */ -#else - double j1(x) /* wrapper j1 */ - double x; -#endif +double j1(double x) /* wrapper j1 */ { #ifdef _IEEE_LIBM return __ieee754_j1(x); @@ -41,12 +31,7 @@ static char rcsid[] = "$NetBSD: w_j1.c,v 1.6 1995/05/10 20:49:15 jtc Exp $"; #endif } -#ifdef __STDC__ - double y1(double x) /* wrapper y1 */ -#else - double y1(x) /* wrapper y1 */ - double x; -#endif +double y1(double x) /* wrapper y1 */ { #ifdef _IEEE_LIBM return __ieee754_y1(x); diff --git a/libm/w_jn.c b/libm/w_jn.c index 173f6aa9e..9ec64c60d 100644 --- a/libm/w_jn.c +++ b/libm/w_jn.c @@ -1,4 +1,3 @@ -/* @(#)w_jn.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: w_jn.c,v 1.6 1995/05/10 20:49:19 jtc Exp $"; -#endif - /* * wrapper jn(int n, double x), yn(int n, double x) * floating point Bessel's function of the 1st and 2nd kind @@ -43,12 +38,7 @@ static char rcsid[] = "$NetBSD: w_jn.c,v 1.6 1995/05/10 20:49:19 jtc Exp $"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ - double jn(int n, double x) /* wrapper jn */ -#else - double jn(n,x) /* wrapper jn */ - double x; int n; -#endif +double jn(int n, double x) /* wrapper jn */ { #ifdef _IEEE_LIBM return __ieee754_jn(n,x); @@ -63,12 +53,7 @@ static char rcsid[] = "$NetBSD: w_jn.c,v 1.6 1995/05/10 20:49:19 jtc Exp $"; #endif } -#ifdef __STDC__ - double yn(int n, double x) /* wrapper yn */ -#else - double yn(n,x) /* wrapper yn */ - double x; int n; -#endif +double yn(int n, double x) /* wrapper yn */ { #ifdef _IEEE_LIBM return __ieee754_yn(n,x); diff --git a/libm/w_lgamma.c b/libm/w_lgamma.c index 20a237488..95bd41330 100644 --- a/libm/w_lgamma.c +++ b/libm/w_lgamma.c @@ -1,4 +1,3 @@ -/* @(#)w_lgamma.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: w_lgamma.c,v 1.6 1995/05/10 20:49:24 jtc Exp $"; -#endif - /* double lgamma(double x) * Return the logarithm of the Gamma function of x. * @@ -24,12 +19,7 @@ static char rcsid[] = "$NetBSD: w_lgamma.c,v 1.6 1995/05/10 20:49:24 jtc Exp $"; #include "math_private.h" libm_hidden_proto(signgam) -#ifdef __STDC__ - double lgamma(double x) -#else - double lgamma(x) - double x; -#endif +double lgamma(double x) { #ifdef _IEEE_LIBM return __ieee754_lgamma_r(x,&signgam); diff --git a/libm/w_lgamma_r.c b/libm/w_lgamma_r.c index f3d0b847b..f4ba60553 100644 --- a/libm/w_lgamma_r.c +++ b/libm/w_lgamma_r.c @@ -1,4 +1,3 @@ -/* @(#)wr_lgamma.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: w_lgamma_r.c,v 1.6 1995/05/10 20:49:27 jtc Exp $"; -#endif - /* * wrapper double lgamma_r(double x, int *signgamp) */ @@ -21,12 +16,7 @@ static char rcsid[] = "$NetBSD: w_lgamma_r.c,v 1.6 1995/05/10 20:49:27 jtc Exp $ #include "math.h" #include "math_private.h" -#ifdef __STDC__ - double lgamma_r(double x, int *signgamp) /* wrapper lgamma_r */ -#else - double lgamma_r(x,signgamp) /* wrapper lgamma_r */ - double x; int *signgamp; -#endif +double lgamma_r(double x, int *signgamp) /* wrapper lgamma_r */ { #ifdef _IEEE_LIBM return __ieee754_lgamma_r(x,signgamp); diff --git a/libm/w_log.c b/libm/w_log.c index 22cdda148..0f7a1eea9 100644 --- a/libm/w_log.c +++ b/libm/w_log.c @@ -1,4 +1,3 @@ -/* @(#)w_log.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: w_log.c,v 1.6 1995/05/10 20:49:33 jtc Exp $"; -#endif - /* * wrapper log(x) */ @@ -21,12 +16,7 @@ static char rcsid[] = "$NetBSD: w_log.c,v 1.6 1995/05/10 20:49:33 jtc Exp $"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ - double log(double x) /* wrapper log */ -#else - double log(x) /* wrapper log */ - double x; -#endif +double log(double x) /* wrapper log */ { #ifdef _IEEE_LIBM return __ieee754_log(x); diff --git a/libm/w_log10.c b/libm/w_log10.c index efb523ecf..ee6c1fe46 100644 --- a/libm/w_log10.c +++ b/libm/w_log10.c @@ -1,4 +1,3 @@ -/* @(#)w_log10.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: w_log10.c,v 1.6 1995/05/10 20:49:35 jtc Exp $"; -#endif - /* * wrapper log10(X) */ @@ -21,12 +16,7 @@ static char rcsid[] = "$NetBSD: w_log10.c,v 1.6 1995/05/10 20:49:35 jtc Exp $"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ - double log10(double x) /* wrapper log10 */ -#else - double log10(x) /* wrapper log10 */ - double x; -#endif +double log10(double x) /* wrapper log10 */ { #ifdef _IEEE_LIBM return __ieee754_log10(x); diff --git a/libm/w_log2.c b/libm/w_log2.c index 7b1a1b18d..b5cc65952 100644 --- a/libm/w_log2.c +++ b/libm/w_log2.c @@ -4,10 +4,11 @@ * * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ + #include #include "math_private.h" -double log2 (double d) +double log2(double d) { - return __ieee754_log2 (d); + return __ieee754_log2(d); } diff --git a/libm/w_pow.c b/libm/w_pow.c index 09e0b5c2c..7062aeae6 100644 --- a/libm/w_pow.c +++ b/libm/w_pow.c @@ -1,6 +1,5 @@ -/* @(#)w_pow.c 5.2 93/10/01 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -19,12 +18,7 @@ #include "math.h" #include "math_private.h" -#ifdef __STDC__ - double pow(double x, double y) /* wrapper pow */ -#else - double pow(x,y) /* wrapper pow */ - double x,y; -#endif +double pow(double x, double y) /* wrapper pow */ { #ifdef _IEEE_LIBM return __ieee754_pow(x,y); diff --git a/libm/w_remainder.c b/libm/w_remainder.c index a30ff880a..5de1ee811 100644 --- a/libm/w_remainder.c +++ b/libm/w_remainder.c @@ -1,4 +1,3 @@ -/* @(#)w_remainder.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: w_remainder.c,v 1.6 1995/05/10 20:49:44 jtc Exp $"; -#endif - /* * wrapper remainder(x,p) */ @@ -21,12 +16,7 @@ static char rcsid[] = "$NetBSD: w_remainder.c,v 1.6 1995/05/10 20:49:44 jtc Exp #include "math.h" #include "math_private.h" -#ifdef __STDC__ - double remainder(double x, double y) /* wrapper remainder */ -#else - double remainder(x,y) /* wrapper remainder */ - double x,y; -#endif +double remainder(double x, double y) /* wrapper remainder */ { #ifdef _IEEE_LIBM return __ieee754_remainder(x,y); diff --git a/libm/w_scalb.c b/libm/w_scalb.c index 2ad6c6ed1..0e3475131 100644 --- a/libm/w_scalb.c +++ b/libm/w_scalb.c @@ -1,4 +1,3 @@ -/* @(#)w_scalb.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: w_scalb.c,v 1.6 1995/05/10 20:49:48 jtc Exp $"; -#endif - /* * wrapper scalb(double x, double fn) is provide for * passing various standard test suite. One @@ -25,19 +20,10 @@ static char rcsid[] = "$NetBSD: w_scalb.c,v 1.6 1995/05/10 20:49:48 jtc Exp $"; #include -#ifdef __STDC__ #ifdef _SCALB_INT - double scalb(double x, int fn) /* wrapper scalb */ -#else - double scalb(double x, double fn) /* wrapper scalb */ -#endif +double scalb(double x, int fn) /* wrapper scalb */ #else - double scalb(x,fn) /* wrapper scalb */ -#ifdef _SCALB_INT - double x; int fn; -#else - double x,fn; -#endif +double scalb(double x, double fn) /* wrapper scalb */ #endif { #ifdef _IEEE_LIBM diff --git a/libm/w_sinh.c b/libm/w_sinh.c index 5d1903fbf..e7e5ae855 100644 --- a/libm/w_sinh.c +++ b/libm/w_sinh.c @@ -1,4 +1,3 @@ -/* @(#)w_sinh.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: w_sinh.c,v 1.6 1995/05/10 20:49:51 jtc Exp $"; -#endif - /* * wrapper sinh(x) */ @@ -21,12 +16,7 @@ static char rcsid[] = "$NetBSD: w_sinh.c,v 1.6 1995/05/10 20:49:51 jtc Exp $"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ - double sinh(double x) /* wrapper sinh */ -#else - double sinh(x) /* wrapper sinh */ - double x; -#endif +double sinh(double x) /* wrapper sinh */ { #ifdef _IEEE_LIBM return __ieee754_sinh(x); diff --git a/libm/w_sqrt.c b/libm/w_sqrt.c index d695b1d8d..6b6f4b767 100644 --- a/libm/w_sqrt.c +++ b/libm/w_sqrt.c @@ -1,4 +1,3 @@ -/* @(#)w_sqrt.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -10,10 +9,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: w_sqrt.c,v 1.6 1995/05/10 20:49:55 jtc Exp $"; -#endif - /* * wrapper sqrt(x) */ @@ -21,12 +16,7 @@ static char rcsid[] = "$NetBSD: w_sqrt.c,v 1.6 1995/05/10 20:49:55 jtc Exp $"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ - double sqrt(double x) /* wrapper sqrt */ -#else - double sqrt(x) /* wrapper sqrt */ - double x; -#endif +double sqrt(double x) /* wrapper sqrt */ { #ifdef _IEEE_LIBM return __ieee754_sqrt(x); diff --git a/libm/w_tgamma.c b/libm/w_tgamma.c index abfb119bd..15723c5d6 100644 --- a/libm/w_tgamma.c +++ b/libm/w_tgamma.c @@ -1,4 +1,3 @@ -/* @(#)w_gamma.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -19,12 +18,7 @@ #include "math_private.h" libm_hidden_proto(signgam) -#ifdef __STDC__ - double tgamma(double x) -#else - double tgamma(x) - double x; -#endif +double tgamma(double x) { double y; int local_signgam; -- cgit v1.2.3