aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/libmath/stubs.c
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/libmath/stubs.c')
-rw-r--r--libstdc++-v3/libmath/stubs.c161
1 files changed, 161 insertions, 0 deletions
diff --git a/libstdc++-v3/libmath/stubs.c b/libstdc++-v3/libmath/stubs.c
index 757af6d..797b201 100644
--- a/libstdc++-v3/libmath/stubs.c
+++ b/libstdc++-v3/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,57 @@ 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)
@@ -158,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)
@@ -192,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)