Split up the Bessel function wrapper files so that most wrapper functions
are in their own file.
This commit is contained in:
parent
0071d9dabb
commit
a9570d9f94
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
50
lib/msun/src/w_y0.c
Normal file
50
lib/msun/src/w_y0.c
Normal file
@ -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
|
||||
}
|
54
lib/msun/src/w_y0f.c
Normal file
54
lib/msun/src/w_y0f.c
Normal file
@ -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
|
||||
}
|
50
lib/msun/src/w_y1.c
Normal file
50
lib/msun/src/w_y1.c
Normal file
@ -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
|
||||
}
|
54
lib/msun/src/w_y1f.c
Normal file
54
lib/msun/src/w_y1f.c
Normal file
@ -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
|
||||
}
|
50
lib/msun/src/w_yn.c
Normal file
50
lib/msun/src/w_yn.c
Normal file
@ -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
|
||||
}
|
50
lib/msun/src/w_ynf.c
Normal file
50
lib/msun/src/w_ynf.c
Normal file
@ -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
|
||||
}
|
Loading…
Reference in New Issue
Block a user