diff --git a/Make.inc b/Make.inc index 4306ee5..647ffe4 100644 --- a/Make.inc +++ b/Make.inc @@ -10,6 +10,8 @@ clean: rm -f *.o *~ # OS-specific stuff +OS = $(shell uname) +ARCH = $(shell uname -m) ifeq ($(OS), Linux) SHLIB_EXT = so diff --git a/src/Makefile b/src/Makefile index af6c172..fcaa62b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -8,8 +8,10 @@ SRCS= \ e_jn.o e_jnf.o e_lgamma.o e_lgamma_r.o e_lgammaf.o e_lgammaf_r.o \ e_log.o e_log10.o e_log10f.o e_log2.o e_log2f.o e_logf.o \ e_pow.o e_powf.o e_remainder.o e_remainderf.o e_scalb.o e_scalbf.o \ + e_rem_pio2.o e_rem_pio2f.o \ e_sinh.o e_sinhf.o e_sqrt.o e_sqrtf.o \ k_cos.o k_exp.o k_expf.o k_rem_pio2.o k_sin.o k_tan.o \ + k_cosf.o k_sinf.o k_tanf.o \ s_asinh.o s_asinhf.o s_atan.o s_atanf.o s_carg.o s_cargf.o s_cargl.o \ s_cbrt.o s_cbrtf.o s_ceil.o s_ceilf.o \ s_copysign.o s_copysignf.o s_cos.o s_cosf.o \ diff --git a/src/e_scalbf.c b/src/e_scalbf.c index 5662435..eaab8d6 100644 --- a/src/e_scalbf.c +++ b/src/e_scalbf.c @@ -30,7 +30,7 @@ __ieee754_scalbf(float x, float fn) #ifdef _SCALB_INT return scalbnf(x,fn); #else - if ((isnanf)(x)||(isnanf)(fn)) return x*fn; + if ((__isnanf)(x)||(__isnanf)(fn)) return x*fn; if (!finitef(fn)) { if(fn>(float)0.0) return x*fn; else return x/(-fn); diff --git a/src/s_cos.c b/src/s_cos.c index d802cee..9dafbca 100644 --- a/src/s_cos.c +++ b/src/s_cos.c @@ -47,9 +47,9 @@ #include #include "openlibm.h" -#define INLINE_REM_PIO2 +//#define INLINE_REM_PIO2 #include "math_private.h" -#include "e_rem_pio2.c" +//#include "e_rem_pio2.c" double cos(double x) diff --git a/src/s_cosf.c b/src/s_cosf.c index 7756b34..5547dae 100644 --- a/src/s_cosf.c +++ b/src/s_cosf.c @@ -20,13 +20,13 @@ #include #include "openlibm.h" -#define INLINE_KERNEL_COSDF -#define INLINE_KERNEL_SINDF -#define INLINE_REM_PIO2F +//#define INLINE_KERNEL_COSDF +//#define INLINE_KERNEL_SINDF +//#define INLINE_REM_PIO2F #include "math_private.h" -#include "e_rem_pio2f.c" -#include "k_cosf.c" -#include "k_sinf.c" +//#include "e_rem_pio2f.c" +//#include "k_cosf.c" +//#include "k_sinf.c" /* Small multiples of pi/2 rounded to double precision. */ static const double diff --git a/src/s_cprojl.c b/src/s_cprojl.c index 1e47bb2..388751d 100644 --- a/src/s_cprojl.c +++ b/src/s_cprojl.c @@ -36,7 +36,7 @@ long double complex cprojl(long double complex z) { - if (!isinf(creall(z)) && !isinf(cimagl(z))) + if (!__isinf(creall(z)) && !__isinf(cimagl(z))) return (z); else return (cpackl(INFINITY, copysignl(0.0, cimagl(z)))); diff --git a/src/s_csqrtl.c b/src/s_csqrtl.c index 097ea6d..e126461 100644 --- a/src/s_csqrtl.c +++ b/src/s_csqrtl.c @@ -59,13 +59,13 @@ csqrtl(long double complex z) /* Handle special cases. */ if (z == 0) return (cpackl(0, b)); - if (isinf(b)) + if (__isinf(b)) return (cpackl(INFINITY, b)); if (isnan(a)) { t = (b - b) / (b - b); /* raise invalid if b is not a NaN */ return (cpackl(a, t)); /* return NaN + NaN i */ } - if (isinf(a)) { + if (__isinf(a)) { /* * csqrt(inf + NaN i) = inf + NaN i * csqrt(inf + y i) = inf + 0 i diff --git a/src/s_sin.c b/src/s_sin.c index 664fe14..8b7109b 100644 --- a/src/s_sin.c +++ b/src/s_sin.c @@ -47,9 +47,9 @@ #include #include "openlibm.h" -#define INLINE_REM_PIO2 +//#define INLINE_REM_PIO2 #include "math_private.h" -#include "e_rem_pio2.c" +//#include "e_rem_pio2.c" double sin(double x) diff --git a/src/s_sinf.c b/src/s_sinf.c index b5bbf28..c03b94c 100644 --- a/src/s_sinf.c +++ b/src/s_sinf.c @@ -20,13 +20,13 @@ #include #include "openlibm.h" -#define INLINE_KERNEL_COSDF -#define INLINE_KERNEL_SINDF -#define INLINE_REM_PIO2F +//#define INLINE_KERNEL_COSDF +//#define INLINE_KERNEL_SINDF +//#define INLINE_REM_PIO2F #include "math_private.h" -#include "e_rem_pio2f.c" -#include "k_cosf.c" -#include "k_sinf.c" +//#include "e_rem_pio2f.c" +//#include "k_cosf.c" +//#include "k_sinf.c" /* Small multiples of pi/2 rounded to double precision. */ static const double diff --git a/src/s_tan.c b/src/s_tan.c index 96ca470..6616702 100644 --- a/src/s_tan.c +++ b/src/s_tan.c @@ -46,9 +46,9 @@ #include #include "openlibm.h" -#define INLINE_REM_PIO2 +//#define INLINE_REM_PIO2 #include "math_private.h" -#include "e_rem_pio2.c" +//#include "e_rem_pio2.c" double tan(double x) diff --git a/src/s_tanf.c b/src/s_tanf.c index 06794e7..c212c43 100644 --- a/src/s_tanf.c +++ b/src/s_tanf.c @@ -20,11 +20,11 @@ #include #include "openlibm.h" -#define INLINE_KERNEL_TANDF -#define INLINE_REM_PIO2F +//#define INLINE_KERNEL_TANDF +//#define INLINE_REM_PIO2F #include "math_private.h" -#include "e_rem_pio2f.c" -#include "k_tanf.c" +//#include "e_rem_pio2f.c" +//#include "k_tanf.c" /* Small multiples of pi/2 rounded to double precision. */ static const double