diff --git a/lib/math/Make.defs b/lib/math/Make.defs index 8e2e60f12d..73d0be6f3b 100644 --- a/lib/math/Make.defs +++ b/lib/math/Make.defs @@ -44,7 +44,7 @@ CSRCS += lib_sinf.c lib_sinhf.c lib_sqrtf.c lib_tanf.c lib_tanhf.c CSRCS += lib_acos.c lib_asin.c lib_atan.c lib_atan2.c lib_ceil.c lib_cos.c CSRCS += lib_cosh.c lib_exp.c lib_fabs.c lib_floor.c lib_fmod.c lib_frexp.c -CRRCS += lib_ldexp.c lib_log.c lib_log10.c lib_log2.c lib_modf.c lib_pow.c +CSRCS += lib_ldexp.c lib_log.c lib_log10.c lib_log2.c lib_modf.c lib_pow.c CSRCS += lib_sin.c lib_sinh.c lib_sqrt.c lib_tan.c lib_tanh.c CSRCS += lib_acosl.c lib_asinl.c lib_atan2l.c lib_atanl.c lib_ceill.c lib_cosl.c diff --git a/lib/math/lib_acos.c b/lib/math/lib_acos.c index 4c5aa67c0a..d5ec36b9ff 100644 --- a/lib/math/lib_acos.c +++ b/lib/math/lib_acos.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double acos(double x) { return (M_PI_2 - asin(x)); diff --git a/lib/math/lib_acosl.c b/lib/math/lib_acosl.c index 3b6fa8aa9d..9113305776 100644 --- a/lib/math/lib_acosl.c +++ b/lib/math/lib_acosl.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double acosl(long double x) { return (M_PI_2 - asinl(x)); diff --git a/lib/math/lib_asin.c b/lib/math/lib_asin.c index 1469d1ed89..61b9535310 100644 --- a/lib/math/lib_asin.c +++ b/lib/math/lib_asin.c @@ -39,7 +39,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double asin(double x) { long double y, y_sin, y_cos; diff --git a/lib/math/lib_asinl.c b/lib/math/lib_asinl.c index bd1cb70ee9..dbb2bc3a2e 100644 --- a/lib/math/lib_asinl.c +++ b/lib/math/lib_asinl.c @@ -39,7 +39,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double asinl(long double x) { long double y, y_sin, y_cos; diff --git a/lib/math/lib_atan.c b/lib/math/lib_atan.c index 2b7f6e3a6f..b4db8fb313 100644 --- a/lib/math/lib_atan.c +++ b/lib/math/lib_atan.c @@ -40,7 +40,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double atan(double x) { return asin(x / sqrt(x * x + 1)); diff --git a/lib/math/lib_atan2.c b/lib/math/lib_atan2.c index bfb33657c6..82d1f47ec3 100644 --- a/lib/math/lib_atan2.c +++ b/lib/math/lib_atan2.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double atan2(double y, double x) { if (y == 0.0) diff --git a/lib/math/lib_atan2l.c b/lib/math/lib_atan2l.c index d7891b6286..07fcd9669b 100644 --- a/lib/math/lib_atan2l.c +++ b/lib/math/lib_atan2l.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double atan2l(long double y, long double x) { diff --git a/lib/math/lib_atanl.c b/lib/math/lib_atanl.c index c8fa239f9d..0fa2030988 100644 --- a/lib/math/lib_atanl.c +++ b/lib/math/lib_atanl.c @@ -40,7 +40,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double atanl(long double x) { return asinl(x / sqrtl(x * x + 1)); diff --git a/lib/math/lib_ceil.c b/lib/math/lib_ceil.c index 12e223128c..0e76029967 100644 --- a/lib/math/lib_ceil.c +++ b/lib/math/lib_ceil.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double ceil(double x) { modf(x, &x); diff --git a/lib/math/lib_ceill.c b/lib/math/lib_ceill.c index 5a0010aa21..a24b56f683 100644 --- a/lib/math/lib_ceill.c +++ b/lib/math/lib_ceill.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double ceill(long double x) { modfl(x, &x); diff --git a/lib/math/lib_cos.c b/lib/math/lib_cos.c index 09808bd9f7..aa672b8559 100644 --- a/lib/math/lib_cos.c +++ b/lib/math/lib_cos.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double cos(double x) { return sin(x + M_PI_2); diff --git a/lib/math/lib_cosh.c b/lib/math/lib_cosh.c index de4f42d7a1..1be44d2933 100644 --- a/lib/math/lib_cosh.c +++ b/lib/math/lib_cosh.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double cosh(double x) { x = exp(x); diff --git a/lib/math/lib_coshl.c b/lib/math/lib_coshl.c index d439127453..4576b88769 100644 --- a/lib/math/lib_coshl.c +++ b/lib/math/lib_coshl.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double coshl(long double x) { x = expl(x); diff --git a/lib/math/lib_cosl.c b/lib/math/lib_cosl.c index 5b73218127..25dd861393 100644 --- a/lib/math/lib_cosl.c +++ b/lib/math/lib_cosl.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double cosl(long double x) { return sinl(x + M_PI_2); diff --git a/lib/math/lib_exp.c b/lib/math/lib_exp.c index 350229860a..1e3120453d 100644 --- a/lib/math/lib_exp.c +++ b/lib/math/lib_exp.c @@ -37,7 +37,7 @@ #include "lib_internal.h" -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE /************************************************************************ * Private Data diff --git a/lib/math/lib_expl.c b/lib/math/lib_expl.c index cd5e6a500c..053103c9bb 100644 --- a/lib/math/lib_expl.c +++ b/lib/math/lib_expl.c @@ -37,7 +37,7 @@ #include "lib_internal.h" -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE /************************************************************************ * Private Data diff --git a/lib/math/lib_fabs.c b/lib/math/lib_fabs.c index a635b0b41d..ff99ceb642 100644 --- a/lib/math/lib_fabs.c +++ b/lib/math/lib_fabs.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double fabs(double x) { return ((x < 0) ? -x : x); diff --git a/lib/math/lib_fabsl.c b/lib/math/lib_fabsl.c index f1e37e3f1a..5313d897da 100644 --- a/lib/math/lib_fabsl.c +++ b/lib/math/lib_fabsl.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double fabsl(long double x) { return ((x < 0) ? -x : x); diff --git a/lib/math/lib_floor.c b/lib/math/lib_floor.c index 895b9a5034..f0c4477a04 100644 --- a/lib/math/lib_floor.c +++ b/lib/math/lib_floor.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double floor(double x) { modf(x, &x); diff --git a/lib/math/lib_floorl.c b/lib/math/lib_floorl.c index 2c70112973..e38ce80ed3 100644 --- a/lib/math/lib_floorl.c +++ b/lib/math/lib_floorl.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double floorl(long double x) { modfl(x, &x); diff --git a/lib/math/lib_fmod.c b/lib/math/lib_fmod.c index c55151d750..939e7e18ad 100644 --- a/lib/math/lib_fmod.c +++ b/lib/math/lib_fmod.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double fmod(double x, double div) { double n0; diff --git a/lib/math/lib_fmodl.c b/lib/math/lib_fmodl.c index c9b3ca7847..51c5e95ec8 100644 --- a/lib/math/lib_fmodl.c +++ b/lib/math/lib_fmodl.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double fmodl(long double x, long double div) { long double n0; diff --git a/lib/math/lib_frexp.c b/lib/math/lib_frexp.c index 6de67f8b5f..56feee8639 100644 --- a/lib/math/lib_frexp.c +++ b/lib/math/lib_frexp.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double frexp(double x, int *exponent) { *exponent = (int)ceil(log2(x)); diff --git a/lib/math/lib_frexpl.c b/lib/math/lib_frexpl.c index 7a0d3c408b..87708ad86c 100644 --- a/lib/math/lib_frexpl.c +++ b/lib/math/lib_frexpl.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double frexpl(long double x, int *exponent) { *exponent = (int)ceill(log2(x)); diff --git a/lib/math/lib_ldexp.c b/lib/math/lib_ldexp.c index ca428dc074..4c7b2b721b 100644 --- a/lib/math/lib_ldexp.c +++ b/lib/math/lib_ldexp.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double ldexp(double x, int n) { return (x * pow(2.0, (double)n)); diff --git a/lib/math/lib_ldexpl.c b/lib/math/lib_ldexpl.c index 0f77bff111..b9a0f4a865 100644 --- a/lib/math/lib_ldexpl.c +++ b/lib/math/lib_ldexpl.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double ldexpl(long double x, int n) { return (x * powl(2.0, (long double)n)); diff --git a/lib/math/lib_libexpi.c b/lib/math/lib_libexpi.c index d2bb971a21..1ec947a71a 100644 --- a/lib/math/lib_libexpi.c +++ b/lib/math/lib_libexpi.c @@ -77,7 +77,7 @@ static double _expi_square_tbl[11] = * Public Functions ************************************************************************/ -static double lib_expi(size_t n) +double lib_expi(size_t n) { size_t i; double val; diff --git a/lib/math/lib_log.c b/lib/math/lib_log.c index 4dd51e87ce..1350ba4fea 100644 --- a/lib/math/lib_log.c +++ b/lib/math/lib_log.c @@ -39,7 +39,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double log(double x) { double y, y_old, ey, epsilon; diff --git a/lib/math/lib_log10.c b/lib/math/lib_log10.c index a6534407e1..47854fca44 100644 --- a/lib/math/lib_log10.c +++ b/lib/math/lib_log10.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double log10(double x) { return (log(x) / M_LN10); diff --git a/lib/math/lib_log10l.c b/lib/math/lib_log10l.c index 8702ed5a55..65892262a8 100644 --- a/lib/math/lib_log10l.c +++ b/lib/math/lib_log10l.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double log10l(long double x) { return (logl(x) / M_LN10); diff --git a/lib/math/lib_log2.c b/lib/math/lib_log2.c index 377d78e292..0aa1e80101 100644 --- a/lib/math/lib_log2.c +++ b/lib/math/lib_log2.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double log2(double x) { return (log(x) / M_LN2); diff --git a/lib/math/lib_log2l.c b/lib/math/lib_log2l.c index cd25c32f11..21d26d4d7b 100644 --- a/lib/math/lib_log2l.c +++ b/lib/math/lib_log2l.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double log2l(long double x) { return (logl(x) / M_LN2); diff --git a/lib/math/lib_logl.c b/lib/math/lib_logl.c index df0031943f..577f9cee2e 100644 --- a/lib/math/lib_logl.c +++ b/lib/math/lib_logl.c @@ -39,7 +39,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double logl(long double x) { long double y, y_old, ey, epsilon; diff --git a/lib/math/lib_modf.c b/lib/math/lib_modf.c index 3b33cde428..9dc6284c20 100644 --- a/lib/math/lib_modf.c +++ b/lib/math/lib_modf.c @@ -36,7 +36,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double modf(double x, double *iptr) { if (fabs(x) >= 4503599627370496.0) diff --git a/lib/math/lib_modfl.c b/lib/math/lib_modfl.c index 55b17eae6d..3b04571f3a 100644 --- a/lib/math/lib_modfl.c +++ b/lib/math/lib_modfl.c @@ -39,7 +39,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double modfl(long double x, long double *iptr) { if (fabs(x) >= 4503599627370496.0) diff --git a/lib/math/lib_pow.c b/lib/math/lib_pow.c index 66f6a2d2e1..af0a55d32f 100644 --- a/lib/math/lib_pow.c +++ b/lib/math/lib_pow.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double pow(double b, double e) { return exp(e * log(b)); diff --git a/lib/math/lib_powl.c b/lib/math/lib_powl.c index 6a820df26b..f5fbf042e9 100644 --- a/lib/math/lib_powl.c +++ b/lib/math/lib_powl.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double powl(long double b, long double e) { return expl(e * logl(b)); diff --git a/lib/math/lib_sin.c b/lib/math/lib_sin.c index 2d21d2309c..c04d6b88b9 100644 --- a/lib/math/lib_sin.c +++ b/lib/math/lib_sin.c @@ -35,7 +35,7 @@ #include #include -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE /************************************************************************ * Private Data diff --git a/lib/math/lib_sinh.c b/lib/math/lib_sinh.c index a22652302c..f33852433b 100644 --- a/lib/math/lib_sinh.c +++ b/lib/math/lib_sinh.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double sinh(double x) { x = exp(x); diff --git a/lib/math/lib_sinhl.c b/lib/math/lib_sinhl.c index 442586ffb8..b0fea29149 100644 --- a/lib/math/lib_sinhl.c +++ b/lib/math/lib_sinhl.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double sinhl(long double x) { x = expl(x); diff --git a/lib/math/lib_sinl.c b/lib/math/lib_sinl.c index f8d9e00edf..a69b548cb3 100644 --- a/lib/math/lib_sinl.c +++ b/lib/math/lib_sinl.c @@ -35,7 +35,7 @@ #include #include -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE /************************************************************************ * Private Data diff --git a/lib/math/lib_sqrt.c b/lib/math/lib_sqrt.c index 96f0d5409e..d77997f7cd 100644 --- a/lib/math/lib_sqrt.c +++ b/lib/math/lib_sqrt.c @@ -41,7 +41,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double sqrt(double x) { long double y, y1; diff --git a/lib/math/lib_sqrtl.c b/lib/math/lib_sqrtl.c index f305092e7b..6674fe50f8 100644 --- a/lib/math/lib_sqrtl.c +++ b/lib/math/lib_sqrtl.c @@ -41,7 +41,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double sqrtl(long double x) { long double y, y1; diff --git a/lib/math/lib_tan.c b/lib/math/lib_tan.c index a9a1d8ebee..bce14b3270 100644 --- a/lib/math/lib_tan.c +++ b/lib/math/lib_tan.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double tan(double x) { return (sin(x) / cos(x)); diff --git a/lib/math/lib_tanh.c b/lib/math/lib_tanh.c index 5cc1d9176c..46fddd06df 100644 --- a/lib/math/lib_tanh.c +++ b/lib/math/lib_tanh.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double tanh(double x) { double x0 = exp(x); diff --git a/lib/math/lib_tanhl.c b/lib/math/lib_tanhl.c index 8b897451e4..23c11d6672 100644 --- a/lib/math/lib_tanhl.c +++ b/lib/math/lib_tanhl.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double tanhl(long double x) { long double x0 = exp(x); diff --git a/lib/math/lib_tanl.c b/lib/math/lib_tanl.c index c4c3712c1c..4973aa073c 100644 --- a/lib/math/lib_tanl.c +++ b/lib/math/lib_tanl.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double tanl(long double x) { return (sinl(x) / cosl(x));