41 lines
1.2 KiB
C
41 lines
1.2 KiB
C
#ifndef CONFORMANCE_MATH_H
|
|
#define CONFORMANCE_MATH_H
|
|
|
|
/* Minimal <math.h> for the freestanding corpus. There is no libm in the bare
|
|
* loader, so transcendental functions are only declared (a test that calls
|
|
* sin/pow/floor and expects a value is curated as a libm skip); the useful
|
|
* classification macros and fabs* are compiler builtins and do not link. */
|
|
#define HUGE_VAL (__builtin_huge_val())
|
|
#define HUGE_VALF (__builtin_huge_valf())
|
|
#define INFINITY (__builtin_inff())
|
|
#define NAN (__builtin_nanf(""))
|
|
#define M_PI 3.14159265358979323846
|
|
|
|
#define isfinite(x) __builtin_isfinite(x)
|
|
#define isinf(x) __builtin_isinf(x)
|
|
#define isnan(x) __builtin_isnan(x)
|
|
#define signbit(x) __builtin_signbit(x)
|
|
#define fabs(x) __builtin_fabs(x)
|
|
#define fabsf(x) __builtin_fabsf(x)
|
|
|
|
double acos(double);
|
|
double asin(double);
|
|
double atan(double);
|
|
double atan2(double, double);
|
|
double ceil(double);
|
|
double cos(double);
|
|
double cosh(double);
|
|
double exp(double);
|
|
double floor(double);
|
|
double fmod(double, double);
|
|
double log(double);
|
|
double log10(double);
|
|
double pow(double, double);
|
|
double sin(double);
|
|
double sinh(double);
|
|
double sqrt(double);
|
|
double tan(double);
|
|
double tanh(double);
|
|
|
|
#endif
|