// The -*- C++ -*- math functions header in my adapted version #ifndef __CMATH__ #define __CMATH__ #include <math.h> float acos (float x){return acosf(x);} float asin (float x){return asinf(x);} float atan (float x){return atanf(x);} float acosh(float x){return acoshf(x);} float asinh(float x){return asinhf(x);} float atanh(float x){return atanhf(x);} float atan2(float x, float y){return atan2f(x,y);} float ceil (float x){return ceilf(x);} float cos (float x){return cosf(x);} float cosh (float x){return coshf(x);} float exp (float x){return expf(x);} float fabs (float x){return fabsf(x);} float floor(float x){return floorf(x);} float fmod (float x, float y){return fmodf(x,y);} float frexp(float x, int* i){return frexpf(x,i);} float modf (float x, float* y){return modff(x,y);} float ldexp(float x, int i){return ldexpf(x,i);} float log (float x){return logf(x);} float log10(float x){return log10f(x);} float pow (float x, float y){return powf(x,y);} float pow (float x, int i){return powf(x,(float) i);} float sin (float x){return sinf(x);} float sinh (float x){return sinhf(x);} float sqrt (float x){return sqrtf(x);} float tan (float x){return tanf(x);} float tanh (float x){return tanhf(x);} inline float abs (float x) { return fabs (x); } inline double abs (double x) { return fabs (x); } double pow(double x, int i){return pow(x, (double) i);} inline long double acos (long double x) {return acosl(x);} inline long double asin (long double x) {return asinl(x);} inline long double atan (long double x) {return atanl(x);} inline long double atan2(long double x, long double y) {return atan2l(x,y);} inline long double atanh(long double x) {return atanhl(x);} inline long double asinh(long double x) {return asinhl(x);} inline long double acosh(long double x) {return acoshl(x);} inline long double ceil (long double x) {return ceill(x);} inline long double cos (long double x) {return cosl(x);} // there IS a problem with coshl in the g++ compiler (or glibc ...) .... inline long double cosh (long double x) { x= fabsl(x); if (x < 23.0) return expl(x)/2.0+expl(-x)/2.0; else return expl(x)/2.0; } inline long double exp (long double x) {return expl(x);} inline long double fabs (long double x) {return fabsl(x);} inline long double floor(long double x) {return floorl(x);} inline long double frexp(long double x, int* i) {return frexpl(x, i);} inline long double fmod (long double x, long double y) {return fmodl(x,y);} inline long double log (long double x) {return logl(x);} inline long double log10(long double x) {return log10l(x);} inline long double modf (long double x, long double* y) {return modfl(x,y);} inline long double pow (long double x, long double y) {return powl(x,y);} inline long double pow (long double x, int i) {return powl(x,(long double) i);} inline long double pow (long double x, unsigned int i) {return powl(x,(long double) i);} inline long double sin (long double x) {return sinl(x);} inline long double sinh (long double x) {return sinhl(x);} inline long double sqrt (long double x) {return sqrtl(x);} inline long double tan (long double x) {return tanl(x);} inline long double tanh (long double x) {return tanhl(x);} inline long double abs (long double x) { return fabsl (x); } inline long double pow(int x, int y) {return powl((long double) x,(long double) y);} #endif