Files
Upsilon/libaxx/include/cmath
Émilie Feral 1964d61fdc [libaxx] add cmath and use cmath instead of math.h when required
Change-Id: Id839b17d33c69e2e002f370e553ff35246a1bc90
2017-08-16 09:55:29 +02:00

60 lines
2.8 KiB
Plaintext

#ifndef LIBAXX_CMATH
#define LIBAXX_CMATH
extern "C" {
#include <math.h>
}
namespace std {
static inline double acos(double x) { return ::acos(x); }
static inline float acos(float x) { return ::acosf(x); }
static inline double acosh(double x) { return ::acosh(x); }
static inline float acosh(float x) { return ::acoshf(x); }
static inline double asin(double x) { return ::asin(x); }
static inline float asin(float x) { return ::asinf(x); }
static inline double asinh(double x) { return ::asinh(x); }
static inline float asinh(float x) { return ::asinhf(x); }
static inline double atan(double x) { return ::atan(x); }
static inline float atan(float x) { return ::atanf(x); }
static inline double atanh(double x) { return ::atanh(x); }
static inline float atanh(float x) { return ::atanhf(x); }
static inline double ceil(double x) { return ::ceil(x); }
static inline float ceil(float x) { return ::ceilf(x); }
static inline double copysign(double x, double y) { return ::copysign(x, y); }
static inline float copysign(float x, float y) { return ::copysignf(x, y); }
static inline double cos(double x) { return ::cos(x); }
static inline float cos(float x) { return ::cosf(x); }
static inline double cosh(double x) { return ::cosh(x); }
static inline float cosh(float x) { return ::coshf(x); }
static inline double exp(double x) { return ::exp(x); }
static inline float exp(float x) { return ::expf(x); }
static inline double fabs(double x) { return ::fabs(x); }
static inline float fabs(float x) { return ::fabsf(x); }
static inline double floor(double x) { return ::floor(x); }
static inline float floor(float x) { return ::floorf(x); }
static inline double lgamma(double x) { return ::lgamma(x); }
static inline float lgamma(float x) { return ::lgammaf(x); }
static inline double log10(double x) { return ::log10(x); }
static inline float log10(float x) { return ::log10f(x); }
static inline double log(double x) { return ::log(x); }
static inline float log(float x) { return ::logf(x); }
static inline double pow(double x, double y) { return ::pow(x, y); }
static inline float pow(float x, float y) { return ::powf(x, y); }
static inline double round(double x) { return ::round(x); }
static inline float round(float x) { return ::roundf(x); }
static inline double sin(double x) { return ::sin(x); }
static inline float sin(float x) { return ::sinf(x); }
static inline double sinh(double x) { return ::sinh(x); }
static inline float sinh(float x) { return ::sinhf(x); }
static inline double sqrt(double x) { return ::sqrt(x); }
static inline float sqrt(float x) { return ::sqrtf(x); }
static inline double tan(double x) { return ::tan(x); }
static inline float tan(float x) { return ::tanf(x); }
static inline double tanh(double x) { return ::tanh(x); }
static inline float tanh(float x) { return ::tanhf(x); }
}
#endif