diff options
author | bde <bde@FreeBSD.org> | 1997-02-20 13:35:15 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1997-02-20 13:35:15 +0000 |
commit | a9570d9f942c778c099c84d08f34773b14f0d9c8 (patch) | |
tree | 968171ff9ded709c4e63152a09c3e290b805168b | |
parent | 0071d9dabbe23115ee60715fbeba793f63803d49 (diff) | |
download | FreeBSD-src-a9570d9f942c778c099c84d08f34773b14f0d9c8.zip FreeBSD-src-a9570d9f942c778c099c84d08f34773b14f0d9c8.tar.gz |
Split up the Bessel function wrapper files so that most wrapper functions
are in their own file.
-rw-r--r-- | lib/msun/Makefile | 3 | ||||
-rw-r--r-- | lib/msun/src/w_j0.c | 30 | ||||
-rw-r--r-- | lib/msun/src/w_j0f.c | 31 | ||||
-rw-r--r-- | lib/msun/src/w_j1.c | 30 | ||||
-rw-r--r-- | lib/msun/src/w_j1f.c | 31 | ||||
-rw-r--r-- | lib/msun/src/w_jn.c | 30 | ||||
-rw-r--r-- | lib/msun/src/w_jnf.c | 29 | ||||
-rw-r--r-- | lib/msun/src/w_y0.c | 50 | ||||
-rw-r--r-- | lib/msun/src/w_y0f.c | 54 | ||||
-rw-r--r-- | lib/msun/src/w_y1.c | 50 | ||||
-rw-r--r-- | lib/msun/src/w_y1f.c | 54 | ||||
-rw-r--r-- | lib/msun/src/w_yn.c | 50 | ||||
-rw-r--r-- | lib/msun/src/w_ynf.c | 50 |
13 files changed, 315 insertions, 177 deletions
diff --git a/lib/msun/Makefile b/lib/msun/Makefile index 8bcf65b..8ff8a00 100644 --- a/lib/msun/Makefile +++ b/lib/msun/Makefile @@ -83,7 +83,8 @@ COMMON_SRCS = e_acos.c e_acosf.c e_acosh.c e_acoshf.c e_asin.c e_asinf.c \ w_j0f.c w_j1.c w_j1f.c w_jn.c w_jnf.c w_lgamma.c w_lgamma_r.c \ w_lgammaf.c w_lgammaf_r.c w_log.c w_log10.c w_log10f.c w_logf.c \ w_pow.c w_powf.c w_remainder.c w_remainderf.c w_scalb.c w_scalbf.c \ - w_sinh.c w_sinhf.c w_sqrt.c w_sqrtf.c + w_sinh.c w_sinhf.c w_sqrt.c w_sqrtf.c \ + w_y0.c w_y0f.c w_y1.c w_y1f.c w_yn.c w_ynf.c # FreeBSD's C library supplies these functions: #COMMON_SRCS+= s_fabs.c s_frexp.c s_isnan.c s_ldexp.c s_modf.c diff --git a/lib/msun/src/w_j0.c b/lib/msun/src/w_j0.c index 93a9c70..e1a4f85 100644 --- a/lib/msun/src/w_j0.c +++ b/lib/msun/src/w_j0.c @@ -15,7 +15,7 @@ static char rcsid[] = "$FreeBSD$"; #endif /* - * wrapper j0(double x), y0(double x) + * wrapper j0(double x) */ #include "math.h" @@ -39,31 +39,3 @@ static char rcsid[] = "$FreeBSD$"; return z; #endif } - -#ifdef __STDC__ - double y0(double x) /* wrapper y0 */ -#else - double y0(x) /* wrapper y0 */ - double x; -#endif -{ -#ifdef _IEEE_LIBM - return __ieee754_y0(x); -#else - double z; - z = __ieee754_y0(x); - if(_LIB_VERSION == _IEEE_ || isnan(x) ) return z; - if(x <= 0.0){ - if(x==0.0) - /* d= -one/(x-x); */ - return __kernel_standard(x,x,8); - else - /* d = zero/(x-x); */ - return __kernel_standard(x,x,9); - } - if(x>X_TLOSS) { - return __kernel_standard(x,x,35); /* y0(x>X_TLOSS) */ - } else - return z; -#endif -} diff --git a/lib/msun/src/w_j0f.c b/lib/msun/src/w_j0f.c index 46ade2f..2c6df51 100644 --- a/lib/msun/src/w_j0f.c +++ b/lib/msun/src/w_j0f.c @@ -18,7 +18,7 @@ static char rcsid[] = "$FreeBSD$"; #endif /* - * wrapper j0f(float x), y0f(float x) + * wrapper j0f(float x) */ #include "math.h" @@ -43,32 +43,3 @@ static char rcsid[] = "$FreeBSD$"; return z; #endif } - -#ifdef __STDC__ - float y0f(float x) /* wrapper y0f */ -#else - float y0f(x) /* wrapper y0f */ - float x; -#endif -{ -#ifdef _IEEE_LIBM - return __ieee754_y0f(x); -#else - float z; - z = __ieee754_y0f(x); - if(_LIB_VERSION == _IEEE_ || isnanf(x) ) return z; - if(x <= (float)0.0){ - if(x==(float)0.0) - /* d= -one/(x-x); */ - return (float)__kernel_standard((double)x,(double)x,108); - else - /* d = zero/(x-x); */ - return (float)__kernel_standard((double)x,(double)x,109); - } - if(x>(float)X_TLOSS) { - /* y0(x>X_TLOSS) */ - return (float)__kernel_standard((double)x,(double)x,135); - } else - return z; -#endif -} diff --git a/lib/msun/src/w_j1.c b/lib/msun/src/w_j1.c index 7270c64..86f1a3f 100644 --- a/lib/msun/src/w_j1.c +++ b/lib/msun/src/w_j1.c @@ -15,7 +15,7 @@ static char rcsid[] = "$FreeBSD$"; #endif /* - * wrapper of j1,y1 + * wrapper of j1 */ #include "math.h" @@ -40,31 +40,3 @@ static char rcsid[] = "$FreeBSD$"; return z; #endif } - -#ifdef __STDC__ - double y1(double x) /* wrapper y1 */ -#else - double y1(x) /* wrapper y1 */ - double x; -#endif -{ -#ifdef _IEEE_LIBM - return __ieee754_y1(x); -#else - double z; - z = __ieee754_y1(x); - if(_LIB_VERSION == _IEEE_ || isnan(x) ) return z; - if(x <= 0.0){ - if(x==0.0) - /* d= -one/(x-x); */ - return __kernel_standard(x,x,10); - else - /* d = zero/(x-x); */ - return __kernel_standard(x,x,11); - } - if(x>X_TLOSS) { - return __kernel_standard(x,x,37); /* y1(x>X_TLOSS) */ - } else - return z; -#endif -} diff --git a/lib/msun/src/w_j1f.c b/lib/msun/src/w_j1f.c index 88f1f1d..8ef1478 100644 --- a/lib/msun/src/w_j1f.c +++ b/lib/msun/src/w_j1f.c @@ -18,7 +18,7 @@ static char rcsid[] = "$FreeBSD$"; #endif /* - * wrapper of j1f,y1f + * wrapper of j1f */ #include "math.h" @@ -44,32 +44,3 @@ static char rcsid[] = "$FreeBSD$"; return z; #endif } - -#ifdef __STDC__ - float y1f(float x) /* wrapper y1f */ -#else - float y1f(x) /* wrapper y1f */ - float x; -#endif -{ -#ifdef _IEEE_LIBM - return __ieee754_y1f(x); -#else - float z; - z = __ieee754_y1f(x); - if(_LIB_VERSION == _IEEE_ || isnanf(x) ) return z; - if(x <= (float)0.0){ - if(x==(float)0.0) - /* d= -one/(x-x); */ - return (float)__kernel_standard((double)x,(double)x,110); - else - /* d = zero/(x-x); */ - return (float)__kernel_standard((double)x,(double)x,111); - } - if(x>(float)X_TLOSS) { - /* y1(x>X_TLOSS) */ - return (float)__kernel_standard((double)x,(double)x,137); - } else - return z; -#endif -} diff --git a/lib/msun/src/w_jn.c b/lib/msun/src/w_jn.c index 48154c7..0b087e5 100644 --- a/lib/msun/src/w_jn.c +++ b/lib/msun/src/w_jn.c @@ -15,7 +15,7 @@ static char rcsid[] = "$FreeBSD$"; #endif /* - * wrapper jn(int n, double x), yn(int n, double x) + * wrapper jn(int n, double x) */ #include "math.h" @@ -40,31 +40,3 @@ static char rcsid[] = "$FreeBSD$"; return z; #endif } - -#ifdef __STDC__ - double yn(int n, double x) /* wrapper yn */ -#else - double yn(n,x) /* wrapper yn */ - double x; int n; -#endif -{ -#ifdef _IEEE_LIBM - return __ieee754_yn(n,x); -#else - double z; - z = __ieee754_yn(n,x); - if(_LIB_VERSION == _IEEE_ || isnan(x) ) return z; - if(x <= 0.0){ - if(x==0.0) - /* d= -one/(x-x); */ - return __kernel_standard((double)n,x,12); - else - /* d = zero/(x-x); */ - return __kernel_standard((double)n,x,13); - } - if(x>X_TLOSS) { - return __kernel_standard((double)n,x,39); /* yn(x>X_TLOSS,n) */ - } else - return z; -#endif -} diff --git a/lib/msun/src/w_jnf.c b/lib/msun/src/w_jnf.c index 0f8373b..9ce1bed 100644 --- a/lib/msun/src/w_jnf.c +++ b/lib/msun/src/w_jnf.c @@ -40,32 +40,3 @@ static char rcsid[] = "$FreeBSD$"; return z; #endif } - -#ifdef __STDC__ - float ynf(int n, float x) /* wrapper ynf */ -#else - float ynf(n,x) /* wrapper ynf */ - float x; int n; -#endif -{ -#ifdef _IEEE_LIBM - return __ieee754_ynf(n,x); -#else - float z; - z = __ieee754_ynf(n,x); - if(_LIB_VERSION == _IEEE_ || isnanf(x) ) return z; - if(x <= (float)0.0){ - if(x==(float)0.0) - /* d= -one/(x-x); */ - return (float)__kernel_standard((double)n,(double)x,112); - else - /* d = zero/(x-x); */ - return (float)__kernel_standard((double)n,(double)x,113); - } - if(x>(float)X_TLOSS) { - /* yn(x>X_TLOSS,n) */ - return (float)__kernel_standard((double)n,(double)x,139); - } else - return z; -#endif -} diff --git a/lib/msun/src/w_y0.c b/lib/msun/src/w_y0.c new file mode 100644 index 0000000..d2da8ce --- /dev/null +++ b/lib/msun/src/w_y0.c @@ -0,0 +1,50 @@ +/* from: @(#)w_j0.c 5.1 93/09/24 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +#ifndef lint +static char rcsid[] = "$FreeBSD$"; +#endif + +/* + * wrapper y0(double x) + */ + +#include "math.h" +#include "math_private.h" + +#ifdef __STDC__ + double y0(double x) /* wrapper y0 */ +#else + double y0(x) /* wrapper y0 */ + double x; +#endif +{ +#ifdef _IEEE_LIBM + return __ieee754_y0(x); +#else + double z; + z = __ieee754_y0(x); + if(_LIB_VERSION == _IEEE_ || isnan(x) ) return z; + if(x <= 0.0){ + if(x==0.0) + /* d= -one/(x-x); */ + return __kernel_standard(x,x,8); + else + /* d = zero/(x-x); */ + return __kernel_standard(x,x,9); + } + if(x>X_TLOSS) { + return __kernel_standard(x,x,35); /* y0(x>X_TLOSS) */ + } else + return z; +#endif +} diff --git a/lib/msun/src/w_y0f.c b/lib/msun/src/w_y0f.c new file mode 100644 index 0000000..a716441 --- /dev/null +++ b/lib/msun/src/w_y0f.c @@ -0,0 +1,54 @@ +/* w_y0f.c -- float version of w_y0.c. + * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com. + */ + +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +#ifndef lint +static char rcsid[] = "$FreeBSD$"; +#endif + +/* + * wrapper y0f(float x) + */ + +#include "math.h" +#include "math_private.h" + +#ifdef __STDC__ + float y0f(float x) /* wrapper y0f */ +#else + float y0f(x) /* wrapper y0f */ + float x; +#endif +{ +#ifdef _IEEE_LIBM + return __ieee754_y0f(x); +#else + float z; + z = __ieee754_y0f(x); + if(_LIB_VERSION == _IEEE_ || isnanf(x) ) return z; + if(x <= (float)0.0){ + if(x==(float)0.0) + /* d= -one/(x-x); */ + return (float)__kernel_standard((double)x,(double)x,108); + else + /* d = zero/(x-x); */ + return (float)__kernel_standard((double)x,(double)x,109); + } + if(x>(float)X_TLOSS) { + /* y0(x>X_TLOSS) */ + return (float)__kernel_standard((double)x,(double)x,135); + } else + return z; +#endif +} diff --git a/lib/msun/src/w_y1.c b/lib/msun/src/w_y1.c new file mode 100644 index 0000000..cde47aa --- /dev/null +++ b/lib/msun/src/w_y1.c @@ -0,0 +1,50 @@ +/* from: @(#)w_j1.c 5.1 93/09/24 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +#ifndef lint +static char rcsid[] = "$FreeBSD$"; +#endif + +/* + * wrapper of y1 + */ + +#include "math.h" +#include "math_private.h" + +#ifdef __STDC__ + double y1(double x) /* wrapper y1 */ +#else + double y1(x) /* wrapper y1 */ + double x; +#endif +{ +#ifdef _IEEE_LIBM + return __ieee754_y1(x); +#else + double z; + z = __ieee754_y1(x); + if(_LIB_VERSION == _IEEE_ || isnan(x) ) return z; + if(x <= 0.0){ + if(x==0.0) + /* d= -one/(x-x); */ + return __kernel_standard(x,x,10); + else + /* d = zero/(x-x); */ + return __kernel_standard(x,x,11); + } + if(x>X_TLOSS) { + return __kernel_standard(x,x,37); /* y1(x>X_TLOSS) */ + } else + return z; +#endif +} diff --git a/lib/msun/src/w_y1f.c b/lib/msun/src/w_y1f.c new file mode 100644 index 0000000..0b8f332 --- /dev/null +++ b/lib/msun/src/w_y1f.c @@ -0,0 +1,54 @@ +/* w_y1f.c -- float version of w_y1.c. + * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com. + */ + +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +#ifndef lint +static char rcsid[] = "$FreeBSD$"; +#endif + +/* + * wrapper of y1f + */ + +#include "math.h" +#include "math_private.h" + +#ifdef __STDC__ + float y1f(float x) /* wrapper y1f */ +#else + float y1f(x) /* wrapper y1f */ + float x; +#endif +{ +#ifdef _IEEE_LIBM + return __ieee754_y1f(x); +#else + float z; + z = __ieee754_y1f(x); + if(_LIB_VERSION == _IEEE_ || isnanf(x) ) return z; + if(x <= (float)0.0){ + if(x==(float)0.0) + /* d= -one/(x-x); */ + return (float)__kernel_standard((double)x,(double)x,110); + else + /* d = zero/(x-x); */ + return (float)__kernel_standard((double)x,(double)x,111); + } + if(x>(float)X_TLOSS) { + /* y1(x>X_TLOSS) */ + return (float)__kernel_standard((double)x,(double)x,137); + } else + return z; +#endif +} diff --git a/lib/msun/src/w_yn.c b/lib/msun/src/w_yn.c new file mode 100644 index 0000000..2323d26 --- /dev/null +++ b/lib/msun/src/w_yn.c @@ -0,0 +1,50 @@ +/* from: @(#)w_jn.c 5.1 93/09/24 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +#ifndef lint +static char rcsid[] = "$FreeBSD$"; +#endif + +/* + * wrapper yn(int n, double x) + */ + +#include "math.h" +#include "math_private.h" + +#ifdef __STDC__ + double yn(int n, double x) /* wrapper yn */ +#else + double yn(n,x) /* wrapper yn */ + double x; int n; +#endif +{ +#ifdef _IEEE_LIBM + return __ieee754_yn(n,x); +#else + double z; + z = __ieee754_yn(n,x); + if(_LIB_VERSION == _IEEE_ || isnan(x) ) return z; + if(x <= 0.0){ + if(x==0.0) + /* d= -one/(x-x); */ + return __kernel_standard((double)n,x,12); + else + /* d = zero/(x-x); */ + return __kernel_standard((double)n,x,13); + } + if(x>X_TLOSS) { + return __kernel_standard((double)n,x,39); /* yn(x>X_TLOSS,n) */ + } else + return z; +#endif +} diff --git a/lib/msun/src/w_ynf.c b/lib/msun/src/w_ynf.c new file mode 100644 index 0000000..f7a2498 --- /dev/null +++ b/lib/msun/src/w_ynf.c @@ -0,0 +1,50 @@ +/* w_ynf.c -- float version of w_yn.c. + * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com. + */ + +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +#ifndef lint +static char rcsid[] = "$FreeBSD$"; +#endif + +#include "math.h" +#include "math_private.h" + +#ifdef __STDC__ + float ynf(int n, float x) /* wrapper ynf */ +#else + float ynf(n,x) /* wrapper ynf */ + float x; int n; +#endif +{ +#ifdef _IEEE_LIBM + return __ieee754_ynf(n,x); +#else + float z; + z = __ieee754_ynf(n,x); + if(_LIB_VERSION == _IEEE_ || isnanf(x) ) return z; + if(x <= (float)0.0){ + if(x==(float)0.0) + /* d= -one/(x-x); */ + return (float)__kernel_standard((double)n,(double)x,112); + else + /* d = zero/(x-x); */ + return (float)__kernel_standard((double)n,(double)x,113); + } + if(x>(float)X_TLOSS) { + /* yn(x>X_TLOSS,n) */ + return (float)__kernel_standard((double)n,(double)x,139); + } else + return z; +#endif +} |