X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=rpikern;a=blobdiff_plain;f=src%2Flibc%2Fmath.h;fp=src%2Flibc%2Fmath.h;h=6e6b2e9e867fcd064ad8b541466852975c4e5b80;hp=0000000000000000000000000000000000000000;hb=32ccc707bc0821d7ff4248fe9f58e92e9c6ebef9;hpb=203b43a75a028e9238307bd6e73768eb8e942071 diff --git a/src/libc/math.h b/src/libc/math.h new file mode 100644 index 0000000..6e6b2e9 --- /dev/null +++ b/src/libc/math.h @@ -0,0 +1,19 @@ +#ifndef MATH_H_ +#define MATH_H_ + +#define INFINITY __builtin_inff() +#define NAN __builtin_nanf + +#define M_PI 3.141592653589793 + +#define sin(x) __builtin_sin(x) +#define cos(x) __builtin_cos(x) +#define tan(x) __builtin_tan(x) +#define fabs(x) __builtin_fabs(x) +#define fmod(x, y) __builtin_fmod(x, y) +#define sqrt(x) __builtin_sqrt(x) +#define atan2(y, x) __builtin_atan2(y, x) + +double pow(double x, double y); + +#endif /* MATH_H_ */