diff options
author | kan <kan@FreeBSD.org> | 2004-07-28 03:12:05 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2004-07-28 03:12:05 +0000 |
commit | 96bad46eee8bf907dceb152bbb9d128bed5a4956 (patch) | |
tree | 75ef0e6da73746d6849e25a0996ae34e1aeff51d /contrib/libstdc++/libmath/stubs.c | |
parent | 5e00ec74d8ce58f99801200d4d3d0412c7cc1b28 (diff) | |
download | FreeBSD-src-96bad46eee8bf907dceb152bbb9d128bed5a4956.zip FreeBSD-src-96bad46eee8bf907dceb152bbb9d128bed5a4956.tar.gz |
Gcc 3.4.2 20040728 C++ support bits.
Diffstat (limited to 'contrib/libstdc++/libmath/stubs.c')
-rw-r--r-- | contrib/libstdc++/libmath/stubs.c | 195 |
1 files changed, 178 insertions, 17 deletions
diff --git a/contrib/libstdc++/libmath/stubs.c b/contrib/libstdc++/libmath/stubs.c index 1968bff..797b201 100644 --- a/contrib/libstdc++/libmath/stubs.c +++ b/contrib/libstdc++/libmath/stubs.c @@ -34,6 +34,57 @@ we use the crude approximation. We'll do better later. */ +#ifndef HAVE_ACOSF +float +acosf(float x) +{ + return (float) acos(x); +} +#endif + +#ifndef HAVE_ACOSL +long double +acosl(long double x) +{ + return acos((double) x); +} +#endif + + +#ifndef HAVE_ASINF +float +asinf(float x) +{ + return (float) asin(x); +} +#endif + +#ifndef HAVE_ASINL +long double +asinl(long double x) +{ + return asin((double) x); +} +#endif + + +#ifndef HAVE_ATANF +float +atanf(float x) +{ + return (float) atan(x); +} +#endif + +#ifndef HAVE_ATANL +long double +atanl(long double x) +{ + return atan ((double) x); +} +#endif + + #ifndef HAVE_ATAN2F float atan2f(float x, float y) @@ -51,6 +102,23 @@ atan2l(long double x, long double y) #endif +#ifndef HAVE_CEILF +float +ceilf(float x) +{ + return (float) ceil(x); +} +#endif + +#ifndef HAVE_CEILL +long double +ceill(long double x) +{ + return ceil((double) x); +} +#endif + + #ifndef HAVE_COSF float cosf(float x) @@ -102,6 +170,74 @@ expl(long double x) #endif +#ifndef HAVE_FLOORF +float +floorf(float x) +{ + return (float) floor(x); +} +#endif + +#ifndef HAVE_FLOORL +long double +floorl(long double x) +{ + return floor((double) x); +} +#endif + + +#ifndef HAVE_FMODF +float +fmodf(float x, float y) +{ + return (float) fmod(x, y); +} +#endif + +#ifndef HAVE_FMODL +long double +fmodl(long double x, long double y) +{ + return fmod((double) x, (double) y); +} +#endif + + +#ifndef HAVE_FREXPF +float +frexpf(float x, int *exp) +{ + return (float) frexp(x, exp); +} +#endif + +#ifndef HAVE_FREXPL +long double +frexpl(long double x, int *exp) +{ + return frexp((double) x, exp); +} +#endif + + +#ifndef HAVE_SQRTF +float +sqrtf(float x) +{ + return (float) sqrt(x); +} +#endif + +#ifndef HAVE_SQRTL +long double +sqrtl(long double x) +{ + return sqrt((double) x); +} +#endif + + /* Compute the hypothenuse of a right triangle with side x and y. */ #ifndef HAVE_HYPOTF float @@ -141,6 +277,23 @@ hypotl(long double x, long double y) +#ifndef HAVE_LDEXPF +float +ldexpf(float x, int exp) +{ + return (float) ldexp(x, exp); +} +#endif + +#ifndef HAVE_LDEXPL +long double +ldexpl(long double x, int exp) +{ + return ldexp((double) x, exp); +} +#endif + + #ifndef HAVE_LOGF float logf(float x) @@ -175,6 +328,31 @@ log10l(long double x) #endif +#ifndef HAVE_MODFF +float +modff(float x, float *iptr) +{ + double result, temp; + + result = modf(x, &temp); + *iptr = (float) temp; + return (float) result; +} +#endif + +#ifndef HAVE_MODFL +long double +modfl(long double x, long double *iptr) +{ + double result, temp; + + result = modf((double) x, &temp); + *iptr = temp; + return result; +} +#endif + + #ifndef HAVE_POWF float powf(float x, float y) @@ -226,23 +404,6 @@ sinhl(long double x) #endif -#ifndef HAVE_SQRTF -float -sqrtf(float x) -{ - return (float) sqrt(x); -} -#endif - -#ifndef HAVE_SQRTL -long double -sqrtl(long double x) -{ - return sqrt((double) x); -} -#endif - - #ifndef HAVE_TANF float tanf(float x) |