add DLLEXPORT to files in src and `int isopenlibm() = 1` function"

This commit is contained in:
Jameson Nash 2013-08-03 05:15:47 -04:00
parent 522eaccce7
commit f7c5ad7088
203 changed files with 306 additions and 263 deletions

View File

@ -1,4 +1,4 @@
$(CUR_SRCS) = \
$(CUR_SRCS) = common.c \
e_acos.c e_acosf.c e_acosh.c e_acoshf.c e_asin.c e_asinf.c \
e_atan2.c e_atan2f.c e_atanh.c e_atanhf.c e_cosh.c e_coshf.c e_exp.c \
e_expf.c e_fmod.c e_fmodf.c e_gamma.c e_gamma_r.c e_gammaf.c \

4
src/common.c Normal file
View File

@ -0,0 +1,4 @@
#include "math_private.h"
DLLEXPORT int isopenlibm() {
return 1;
}

View File

@ -61,7 +61,7 @@ qS2 = 2.02094576023350569471e+00, /* 0x40002AE5, 0x9C598AC8 */
qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */
qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
double
DLLEXPORT double
__ieee754_acos(double x)
{
double z,p,q,r,w,s,c,df;

View File

@ -31,7 +31,7 @@ pS1 = -4.2743422091e-02,
pS2 = -8.6563630030e-03,
qS1 = -7.0662963390e-01;
float
DLLEXPORT float
__ieee754_acosf(float x)
{
float z,p,q,r,w,s,c,df;

View File

@ -36,7 +36,7 @@ static const double
one = 1.0,
ln2 = 6.93147180559945286227e-01; /* 0x3FE62E42, 0xFEFA39EF */
double
DLLEXPORT double
__ieee754_acosh(double x)
{
double t;

View File

@ -23,7 +23,7 @@ static const float
one = 1.0,
ln2 = 6.9314718246e-01; /* 0x3f317218 */
float
DLLEXPORT float
__ieee754_acoshf(float x)
{
float t;

View File

@ -40,7 +40,7 @@ static const long double
pi = 3.14159265358979323846264338327950280e+00L;
#endif
long double
DLLEXPORT long double
acosl(long double x)
{
union IEEEl2bits u;

View File

@ -67,7 +67,7 @@ qS2 = 2.02094576023350569471e+00, /* 0x40002AE5, 0x9C598AC8 */
qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */
qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
double
DLLEXPORT double
__ieee754_asin(double x)
{
double t=0.0,w,p,q,c,r,s;

View File

@ -31,7 +31,7 @@ qS1 = -7.0662963390e-01;
static const double
pio2 = 1.570796326794896558e+00;
float
DLLEXPORT float
__ieee754_asinf(float x)
{
double s;

View File

@ -30,7 +30,7 @@ static const long double
one = 1.00000000000000000000e+00,
huge = 1.000e+300;
long double
DLLEXPORT long double
asinl(long double x)
{
union IEEEl2bits u;

View File

@ -57,7 +57,7 @@ pi = 3.1415926535897931160E+00; /* 0x400921FB, 0x54442D18 */
static volatile double
pi_lo = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */
double
DLLEXPORT double
__ieee754_atan2(double y, double x)
{
double z;

View File

@ -29,7 +29,7 @@ pi = 3.1415927410e+00; /* 0x40490fdb */
static volatile float
pi_lo = -8.7422776573e-08; /* 0xb3bbbd2e */
float
DLLEXPORT float
__ieee754_atan2f(float y, float x)
{
float z;

View File

@ -43,7 +43,7 @@ static const long double
pi = 3.14159265358979323846264338327950280e+00L;
#endif
long double
DLLEXPORT long double
atan2l(long double y, long double x)
{
union IEEEl2bits ux, uy;

View File

@ -39,7 +39,7 @@
static const double one = 1.0, huge = 1e300;
static const double zero = 0.0;
double
DLLEXPORT double
__ieee754_atanh(double x)
{
double t;

View File

@ -23,7 +23,7 @@ static const float one = 1.0, huge = 1e30;
static const float zero = 0.0;
float
DLLEXPORT float
__ieee754_atanhf(float x)
{
float t;

View File

@ -40,7 +40,7 @@
static const double one = 1.0, half=0.5, huge = 1.0e300;
double
DLLEXPORT double
__ieee754_cosh(double x)
{
double t,w;

View File

@ -21,7 +21,7 @@
static const float one = 1.0, half=0.5, huge = 1.0e30;
float
DLLEXPORT float
__ieee754_coshf(float x)
{
float t,w;

View File

@ -101,7 +101,7 @@ P5 = 4.13813679705723846039e-08; /* 0x3E663769, 0x72BEA4D0 */
static volatile double
twom1000= 9.33263618503218878990e-302; /* 2**-1000=0x01700000,0*/
double
DLLEXPORT double
__ieee754_exp(double x) /* default IEEE double exp */
{
double y,hi=0.0,lo=0.0,c,t,twopk;

View File

@ -41,7 +41,7 @@ P2 = -2.7667332906e-3; /* -0xb55215.0p-32 */
static volatile float twom100 = 7.8886090522e-31; /* 2**-100=0x0d800000 */
float
DLLEXPORT float
__ieee754_expf(float x)
{
float y,hi=0.0,lo=0.0,c,t,twopk;

View File

@ -25,7 +25,7 @@
static const double one = 1.0, Zero[] = {0.0, -0.0,};
double
DLLEXPORT double
__ieee754_fmod(double x, double y)
{
int32_t n,hx,hy,hz,ix,iy,sx,i;

View File

@ -27,7 +27,7 @@
static const float one = 1.0, Zero[] = {0.0, -0.0,};
float
DLLEXPORT float
__ieee754_fmodf(float x, float y)
{
int32_t n,hx,hy,hz,ix,iy,sx,i;

View File

@ -61,7 +61,7 @@ static const long double one = 1.0, Zero[] = {0.0, -0.0,};
* - The high part of the mantissa fits in an int64_t with enough room
* for an explicit integer bit in front of the fractional bits.
*/
long double
DLLEXPORT long double
fmodl(long double x, long double y)
{
union IEEEl2bits ux, uy;

View File

@ -26,7 +26,7 @@
extern int signgam;
double
DLLEXPORT double
__ieee754_gamma(double x)
{
return __ieee754_gamma_r(x,&signgam);

View File

@ -25,7 +25,7 @@
#include "openlibm.h"
#include "math_private.h"
double
DLLEXPORT double
__ieee754_gamma_r(double x, int *signgamp)
{
return __ieee754_lgamma_r(x,signgamp);

View File

@ -27,7 +27,7 @@
extern int signgam;
float
DLLEXPORT float
__ieee754_gammaf(float x)
{
return __ieee754_gammaf_r(x,&signgam);

View File

@ -26,7 +26,7 @@
#include "openlibm.h"
#include "math_private.h"
float
DLLEXPORT float
__ieee754_gammaf_r(float x, int *signgamp)
{
return __ieee754_lgammaf_r(x,signgamp);

View File

@ -51,7 +51,7 @@
#include "openlibm.h"
#include "math_private.h"
double
DLLEXPORT double
__ieee754_hypot(double x, double y)
{
double a,b,t1,t2,y1,y2,w;

View File

@ -19,7 +19,7 @@
#include "openlibm.h"
#include "math_private.h"
float
DLLEXPORT float
__ieee754_hypotf(float x, float y)
{
float a,b,t1,t2,y1,y2,w;

View File

@ -45,7 +45,7 @@ typedef u_int64_t man_t;
typedef u_int32_t man_t;
#endif
long double
DLLEXPORT long double
hypotl(long double x, long double y)
{
long double a=x,b=y,t1,t2,y1,y2,w;

View File

@ -81,7 +81,7 @@ S04 = 1.16614003333790000205e-09; /* 0x3E1408BC, 0xF4745D8F */
static const double zero = 0.0;
double
DLLEXPORT double
__ieee754_j0(double x)
{
double z, s,c,ss,cc,r,u,v;
@ -142,7 +142,7 @@ v02 = 7.60068627350353253702e-05, /* 0x3F13ECBB, 0xF578C6C1 */
v03 = 2.59150851840457805467e-07, /* 0x3E91642D, 0x7FF202FD */
v04 = 4.41110311332675467403e-10; /* 0x3DFE5018, 0x3BD6D9EF */
double
DLLEXPORT double
__ieee754_y0(double x)
{
double z, s,c,ss,cc,u,v;

View File

@ -38,7 +38,7 @@ S04 = 1.1661400734e-09; /* 0x30a045e8 */
static const float zero = 0.0;
float
DLLEXPORT float
__ieee754_j0f(float x)
{
float z, s,c,ss,cc,r,u,v;
@ -99,7 +99,7 @@ v02 = 7.6006865129e-05, /* 0x389f65e0 */
v03 = 2.5915085189e-07, /* 0x348b216c */
v04 = 4.4111031494e-10; /* 0x2ff280c2 */
float
DLLEXPORT float
__ieee754_y0f(float x)
{
float z, s,c,ss,cc,u,v;

View File

@ -82,7 +82,7 @@ s05 = 1.23542274426137913908e-11; /* 0x3DAB2ACF, 0xCFB97ED8 */
static const double zero = 0.0;
double
DLLEXPORT double
__ieee754_j1(double x)
{
double z, s,c,ss,cc,r,u,v,y;
@ -139,7 +139,7 @@ static const double V0[5] = {
1.66559246207992079114e-11, /* 0x3DB25039, 0xDACA772A */
};
double
DLLEXPORT double
__ieee754_y1(double x)
{
double z, s,c,ss,cc,u,v;

View File

@ -39,7 +39,7 @@ s05 = 1.2354227016e-11; /* 0x2d59567e */
static const float zero = 0.0;
float
DLLEXPORT float
__ieee754_j1f(float x)
{
float z, s,c,ss,cc,r,u,v,y;
@ -96,7 +96,7 @@ static const float V0[5] = {
1.6655924903e-11, /* 0x2d9281cf */
};
float
DLLEXPORT float
__ieee754_y1f(float x)
{
float z, s,c,ss,cc,u,v;

View File

@ -50,7 +50,7 @@ one = 1.00000000000000000000e+00; /* 0x3FF00000, 0x00000000 */
static const double zero = 0.00000000000000000000e+00;
double
DLLEXPORT double
__ieee754_jn(int n, double x)
{
int32_t i,hx,ix,lx, sgn;
@ -211,7 +211,7 @@ __ieee754_jn(int n, double x)
if(sgn==1) return -b; else return b;
}
double
DLLEXPORT double
__ieee754_yn(int n, double x)
{
int32_t i,hx,ix,lx;

View File

@ -25,7 +25,7 @@ one = 1.0000000000e+00; /* 0x3F800000 */
static const float zero = 0.0000000000e+00;
float
DLLEXPORT float
__ieee754_jnf(int n, float x)
{
int32_t i,hx,ix, sgn;
@ -163,7 +163,7 @@ __ieee754_jnf(int n, float x)
if(sgn==1) return -b; else return b;
}
float
DLLEXPORT float
__ieee754_ynf(int n, float x)
{
int32_t i,hx,ix,ib;

View File

@ -26,7 +26,7 @@
extern int signgam;
double
DLLEXPORT double
__ieee754_lgamma(double x)
{
return __ieee754_lgamma_r(x,&signgam);

View File

@ -201,7 +201,7 @@ static const double zero= 0.00000000000000000000e+00;
}
double
DLLEXPORT double
__ieee754_lgamma_r(double x, int *signgamp)
{
double t,y,z,nadj,p,p1,p2,p3,q,r,w;

View File

@ -27,7 +27,7 @@
extern int signgam;
float
DLLEXPORT float
__ieee754_lgammaf(float x)
{
return __ieee754_lgammaf_r(x,&signgam);

View File

@ -134,7 +134,7 @@ static const float zero= 0.0000000000e+00;
}
float
DLLEXPORT float
__ieee754_lgammaf_r(float x, int *signgamp)
{
float t,y,z,nadj,p,p1,p2,p3,q,r,w;

View File

@ -82,7 +82,7 @@ Lg7 = 1.479819860511658591e-01; /* 3FC2F112 DF3E5244 */
static const double zero = 0.0;
double
DLLEXPORT double
__ieee754_log(double x)
{
double hfsq,f,s,z,R,w,t1,t2,dk;

View File

@ -35,7 +35,7 @@ log10_2lo = 3.69423907715893078616e-13; /* 0x3D59FEF3, 0x11F12B36 */
static const double zero = 0.0;
double
DLLEXPORT double
__ieee754_log10(double x)
{
double f,hfsq,hi,lo,r,val_hi,val_lo,w,y,y2;

View File

@ -32,7 +32,7 @@ log10_2lo = 7.9034151668e-07; /* 0x355427db */
static const float zero = 0.0;
float
DLLEXPORT float
__ieee754_log10f(float x)
{
float f,hfsq,hi,lo,r,y;

View File

@ -35,7 +35,7 @@ ivln2lo = 1.67517131648865118353e-10; /* 0x3de705fc, 0x2eefa200 */
static const double zero = 0.0;
double
DLLEXPORT double
__ieee754_log2(double x)
{
double f,hfsq,hi,lo,r,val_hi,val_lo,w,y;

View File

@ -30,7 +30,7 @@ ivln2lo = -1.7605285393e-04; /* 0xb9389ad4 */
static const float zero = 0.0;
float
DLLEXPORT float
__ieee754_log2f(float x)
{
float f,hfsq,hi,lo,r,y;

View File

@ -31,7 +31,7 @@ Lg4 = 0xf89e26.0p-26; /* 0.24279078841 */
static const float zero = 0.0;
float
DLLEXPORT float
__ieee754_logf(float x)
{
float hfsq,f,s,z,R,w,t1,t2,dk;

View File

@ -93,7 +93,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*/
double
DLLEXPORT double
__ieee754_pow(double x, double y)
{
double z,ax,z_h,z_l,p_h,p_l;

View File

@ -52,7 +52,7 @@ ivln2 = 1.4426950216e+00, /* 0x3fb8aa3b =1/ln2 */
ivln2_h = 1.4426879883e+00, /* 0x3fb8aa00 =16b 1/ln2*/
ivln2_l = 7.0526075433e-06; /* 0x36eca570 =1/ln2 tail*/
float
DLLEXPORT float
__ieee754_powf(float x, float y)
{
float z,ax,z_h,z_l,p_h,p_l;

View File

@ -52,7 +52,7 @@ pio2_3t = 8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */
extern
#endif
//__inline int
int
DLLEXPORT int
__ieee754_rem_pio2(double x, double *y)
{
double z,w,t,r,fn;

View File

@ -44,7 +44,7 @@ pio2_1t = 1.58932547735281966916e-08; /* 0x3E5110b4, 0x611A6263 */
extern
#endif
//__inline int
int
DLLEXPORT int
__ieee754_rem_pio2f(float x, double *y)
{
double w,r,fn;

View File

@ -31,7 +31,7 @@
static const double zero = 0.0;
double
DLLEXPORT double
__ieee754_remainder(double x, double p)
{
int32_t hx,hp;

View File

@ -22,7 +22,7 @@
static const float zero = 0.0;
float
DLLEXPORT float
__ieee754_remainderf(float x, float p)
{
int32_t hx,hp;

View File

@ -28,8 +28,9 @@
//__FBSDID("$FreeBSD: src/lib/msun/src/e_remainderl.c,v 1.1 2008/03/30 20:47:42 das Exp $");
#include <openlibm.h>
#include "math_private.h"
long double
DLLEXPORT long double
remainderl(long double x, long double y)
{
int quo;

View File

@ -24,10 +24,10 @@
#include "math_private.h"
#ifdef _SCALB_INT
double
DLLEXPORT double
__ieee754_scalb(double x, int fn)
#else
double
DLLEXPORT double
__ieee754_scalb(double x, double fn)
#endif
{

View File

@ -20,10 +20,10 @@
#include "math_private.h"
#ifdef _SCALB_INT
float
DLLEXPORT float
__ieee754_scalbf(float x, int fn)
#else
float
DLLEXPORT float
__ieee754_scalbf(float x, float fn)
#endif
{

View File

@ -37,7 +37,7 @@
static const double one = 1.0, shuge = 1.0e307;
double
DLLEXPORT double
__ieee754_sinh(double x)
{
double t,h;

View File

@ -21,7 +21,7 @@
static const float one = 1.0, shuge = 1.0e37;
float
DLLEXPORT float
__ieee754_sinhf(float x)
{
float t,h;

View File

@ -91,7 +91,7 @@
static const double one = 1.0, tiny=1.0e-300;
double
DLLEXPORT double
__ieee754_sqrt(double x)
{
double z;

View File

@ -18,7 +18,7 @@
static const float one = 1.0, tiny=1.0e-30;
float
DLLEXPORT float
__ieee754_sqrtf(float x)
{
float z;

View File

@ -32,6 +32,7 @@
#include "fpmath.h"
#include "openlibm.h"
#include "math_private.h"
/* Return (x + ulp) for normal positive x. Assumes no overflow. */
static inline long double
@ -74,7 +75,7 @@ dec(long double x)
* if possible.
*/
long double
DLLEXPORT long double
sqrtl(long double x)
{
union IEEEl2bits u;

View File

@ -65,7 +65,7 @@ C4 = -2.75573143513906633035e-07, /* 0xBE927E4F, 0x809C52AD */
C5 = 2.08757232129817482790e-09, /* 0x3E21EE9E, 0xBDB4B1C4 */
C6 = -1.13596475577881948265e-11; /* 0xBDA8FAE9, 0xBE8838D4 */
double
DLLEXPORT double
__kernel_cos(double x, double y)
{
double hz,z,r,w;

View File

@ -34,7 +34,7 @@ C3 = 0x199342e0ee5069.0p-68; /* 0.0000243904487962774090654 */
extern
#endif
//__inline float
float
DLLEXPORT float
__kernel_cosdf(double x)
{
double r, w, z;

View File

@ -71,7 +71,7 @@ __frexp_exp(double x, int *expt)
* has filtered out very large x, for which overflow would be inevitable.
*/
double
DLLEXPORT double
__ldexp_exp(double x, int expt)
{
double exp_x, scale;
@ -83,7 +83,7 @@ __ldexp_exp(double x, int expt)
return (exp_x * scale);
}
double complex
DLLEXPORT double complex
__ldexp_cexp(double complex z, int expt)
{
double x, y, exp_x, scale1, scale2;

View File

@ -54,7 +54,7 @@ __frexp_expf(float x, int *expt)
return (exp_x);
}
float
DLLEXPORT float
__ldexp_expf(float x, int expt)
{
float exp_x, scale;
@ -66,7 +66,7 @@ __ldexp_expf(float x, int expt)
return (exp_x * scale);
}
float complex
DLLEXPORT float complex
__ldexp_cexpf(float complex z, int expt)
{
float x, y, exp_x, scale1, scale2;

View File

@ -290,7 +290,7 @@ one = 1.0,
two24 = 1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */
twon24 = 5.96046447753906250000e-08; /* 0x3E700000, 0x00000000 */
int
DLLEXPORT int
__kernel_rem_pio2(double *x, double *y, int e0, int nx, int prec)
{
int32_t jz,jx,jv,jp,jk,carry,n,iq[20],i,j,k,m,q0,ih;

View File

@ -56,7 +56,7 @@ S4 = 2.75573137070700676789e-06, /* 0x3EC71DE3, 0x57B1FE7D */
S5 = -2.50507602534068634195e-08, /* 0xBE5AE5E6, 0x8A2B9CEB */
S6 = 1.58969099521155010221e-10; /* 0x3DE5D93A, 0x5ACFD57C */
double
DLLEXPORT double
__kernel_sin(double x, double y, int iy)
{
double z,r,v,w;

View File

@ -33,7 +33,7 @@ S4 = 0x16cd878c3b46a7.0p-71; /* 0.0000027183114939898219064 */
extern
#endif
//__inline float
float
DLLEXPORT float
__kernel_sindf(double x)
{
double r, s, w, z;

View File

@ -75,7 +75,7 @@ static const double xxx[] = {
#define T xxx
/* INDENT ON */
double
DLLEXPORT double
__kernel_tan(double x, double y, int iy) {
double z, r, v, w, s;
int32_t ix, hx;

View File

@ -36,7 +36,7 @@ T[] = {
extern
#endif
//__inline float
float
DLLEXPORT float
__kernel_tandf(double x, int iy)
{
double z,r,w,s,t,u;

View File

@ -442,4 +442,14 @@ long double __kernel_sinl(long double, long double, int);
long double __kernel_cosl(long double, long double);
long double __kernel_tanl(long double, long double, int);
#ifdef _WIN32
# ifdef IMPORT_EXPORTS
# define DLLEXPORT __declspec(dllimport)
# else
# define DLLEXPORT __declspec(dllexport)
# endif
#else
#define DLLEXPORT __attribute__ ((visibility("default")))
#endif
#endif /* !_MATH_PRIVATE_H_ */

View File

@ -32,7 +32,7 @@ one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
ln2 = 6.93147180559945286227e-01, /* 0x3FE62E42, 0xFEFA39EF */
huge= 1.00000000000000000000e+300;
double
DLLEXPORT double
asinh(double x)
{
double t,w;

View File

@ -24,7 +24,7 @@ one = 1.0000000000e+00, /* 0x3F800000 */
ln2 = 6.9314718246e-01, /* 0x3f317218 */
huge= 1.0000000000e+30;
float
DLLEXPORT float
asinhf(float x)
{
float t,w;

View File

@ -70,7 +70,7 @@ static const double aT[] = {
one = 1.0,
huge = 1.0e300;
double
DLLEXPORT double
atan(double x)
{
double w,s1,s2,z;

View File

@ -45,7 +45,7 @@ static const float
one = 1.0,
huge = 1.0e30;
float
DLLEXPORT float
atanf(float x)
{
float w,s1,s2,z;

View File

@ -29,7 +29,7 @@ static const long double
one = 1.0,
huge = 1.0e300;
long double
DLLEXPORT long double
atanl(long double x)
{
union IEEEl2bits u;

View File

@ -29,8 +29,9 @@
#include <complex.h>
#include <openlibm.h>
#include "math_private.h"
double
DLLEXPORT double
carg(double complex z)
{

View File

@ -29,8 +29,9 @@
#include <complex.h>
#include <openlibm.h>
#include "math_private.h"
float
DLLEXPORT float
cargf(float complex z)
{

View File

@ -29,8 +29,9 @@
#include <complex.h>
#include <openlibm.h>
#include "math_private.h"
long double
DLLEXPORT long double
cargl(long double complex z)
{

View File

@ -33,7 +33,7 @@ P2 = 1.621429720105354466140, /* 0x3ff9f160, 0x4a49d6c2 */
P3 = -0.758397934778766047437, /* 0xbfe844cb, 0xbee751d9 */
P4 = 0.145996192886612446982; /* 0x3fc2b000, 0xd4e4edd7 */
double
DLLEXPORT double
cbrt(double x)
{
int32_t hx;

View File

@ -27,7 +27,7 @@ static const unsigned
B1 = 709958130, /* B1 = (127-127.0/3-0.03306235651)*2**23 */
B2 = 642849266; /* B2 = (127-127.0/3-24/3-0.03306235651)*2**23 */
float
DLLEXPORT float
cbrtf(float x)
{
double r,T;

View File

@ -33,7 +33,7 @@
static const unsigned
B1 = 709958130; /* B1 = (127-127.0/3-0.03306235651)*2**23 */
long double
DLLEXPORT long double
cbrtl(long double x)
{
union IEEEl2bits u, v;

View File

@ -44,7 +44,7 @@
static const double huge = 0x1p1023;
double complex
DLLEXPORT double complex
ccosh(double complex z)
{
double x, y, h;
@ -146,7 +146,7 @@ ccosh(double complex z)
return (cpack((x * x) * (y - y), (x + x) * (y - y)));
}
double complex
DLLEXPORT double complex
ccos(double complex z)
{

View File

@ -38,7 +38,7 @@
static const float huge = 0x1p127;
float complex
DLLEXPORT float complex
ccoshf(float complex z)
{
float x, y, h;
@ -96,7 +96,7 @@ ccoshf(float complex z)
return (cpackf((x * x) * (y - y), (x + x) * (y - y)));
}
float complex
DLLEXPORT float complex
ccosf(float complex z)
{

View File

@ -29,7 +29,7 @@
static const double huge = 1.0e300;
double
DLLEXPORT double
ceil(double x)
{
int32_t i0,i1,j0;

View File

@ -21,7 +21,7 @@
static const float huge = 1.0e30;
float
DLLEXPORT float
ceilf(float x)
{
int32_t i0,j0;

View File

@ -52,7 +52,7 @@
static const long double huge = 1.0e300;
long double
DLLEXPORT long double
ceill(long double x)
{
union IEEEl2bits u = { .e = x };

View File

@ -36,7 +36,7 @@ static const u_int32_t
exp_ovfl = 0x40862e42, /* high bits of MAX_EXP * ln2 ~= 710 */
cexp_ovfl = 0x4096b8e4; /* (MAX_EXP - MIN_DENORM_EXP) * ln2 */
double complex
DLLEXPORT double complex
cexp(double complex z)
{
double x, y, exp_x;

View File

@ -36,7 +36,7 @@ static const u_int32_t
exp_ovfl = 0x42b17218, /* MAX_EXP * ln2 ~= 88.722839355 */
cexp_ovfl = 0x43400074; /* (MAX_EXP - MIN_DENORM_EXP) * ln2 */
float complex
DLLEXPORT float complex
cexpf(float complex z)
{
float x, y, exp_x;

View File

@ -29,7 +29,7 @@
#include <complex.h>
#include "math_private.h"
double
DLLEXPORT double
cimag(double complex z)
{
const double_complex z1 = { .f = z };

View File

@ -29,7 +29,7 @@
#include <complex.h>
#include "math_private.h"
float
DLLEXPORT float
cimagf(float complex z)
{
const float_complex z1 = { .f = z };

View File

@ -29,7 +29,7 @@
#include <complex.h>
#include "math_private.h"
long double
DLLEXPORT long double
cimagl(long double complex z)
{
const long_double_complex z1 = { .f = z };

View File

@ -30,7 +30,7 @@
#include "math_private.h"
double complex
DLLEXPORT double complex
conj(double complex z)
{

View File

@ -30,7 +30,7 @@
#include "math_private.h"
float complex
DLLEXPORT float complex
conjf(float complex z)
{

View File

@ -30,7 +30,7 @@
#include "math_private.h"
long double complex
DLLEXPORT long double complex
conjl(long double complex z)
{

View File

@ -22,7 +22,7 @@
#include "openlibm.h"
#include "math_private.h"
double
DLLEXPORT double
copysign(double x, double y)
{
u_int32_t hx,hy;

View File

@ -25,7 +25,7 @@
#include "openlibm.h"
#include "math_private.h"
float
DLLEXPORT float
copysignf(float x, float y)
{
u_int32_t ix,iy;

View File

@ -27,10 +27,10 @@
*/
#include <openlibm.h>
#include "math_private.h"
#include "fpmath.h"
long double
DLLEXPORT long double
copysignl(long double x, long double y)
{
union IEEEl2bits ux, uy;

View File

@ -51,7 +51,7 @@
#include "math_private.h"
//#include "e_rem_pio2.c"
double
DLLEXPORT double
cos(double x)
{
double y[2],z=0.0;

View File

@ -35,7 +35,7 @@ c2pio2 = 2*M_PI_2, /* 0x400921FB, 0x54442D18 */
c3pio2 = 3*M_PI_2, /* 0x4012D97C, 0x7F3321D2 */
c4pio2 = 4*M_PI_2; /* 0x401921FB, 0x54442D18 */
float
DLLEXPORT float
cosf(float x)
{
double y;

View File

@ -44,7 +44,7 @@
#error "Unsupported long double format"
#endif
long double
DLLEXPORT long double
cosl(long double x)
{
union IEEEl2bits z;

View File

@ -47,8 +47,9 @@
#include <complex.h>
#include <float.h>
#include <openlibm.h>
#include "math_private.h"
double complex
DLLEXPORT double complex
cpow(double complex a, double complex z)
{
double complex w;

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