ldso: dlopen test
[libc-test] / src / math / gen / gen.h
1 #include <fenv.h>
2 #include <math.h>
3 #include <float.h>
4
5 #undef RN
6 #undef RZ
7 #undef RD
8 #undef RU
9 #define RN FE_TONEAREST
10 #define RZ FE_TOWARDZERO
11 #define RD FE_DOWNWARD
12 #define RU FE_UPWARD
13
14 #undef INEXACT
15 #undef INVALID
16 #undef DIVBYZERO
17 #undef UNDERFLOW
18 #undef OVERFLOW
19 #define INEXACT FE_INEXACT
20 #define INVALID FE_INVALID
21 #define DIVBYZERO FE_DIVBYZERO
22 #define UNDERFLOW FE_UNDERFLOW
23 #define OVERFLOW FE_OVERFLOW
24
25 #undef inf
26 #undef nan
27 #define inf INFINITY
28 #define nan NAN
29
30 struct f1 { int r; float x; float y; float dy; int e; };
31 struct f2 { int r; float x; float x2; float y; float dy; int e; };
32 struct d1 { int r; double x; double y; float dy; int e; };
33 struct d2 { int r; double x; double x2; double y; float dy; int e; };
34 struct l1 { int r; long double x; long double y; float dy; int e; };
35 struct l2 { int r; long double x; long double x2; long double y; float dy; int e; };
36
37 struct t {
38         int type;
39         int r;
40         long double x;
41         long double x2;
42         long double x3;
43         long long i;
44         long double y;
45         long double y2;
46         float dy;
47         float dy2;
48         int e;
49 };
50
51 char *skipstr(char *, char *);
52 int splitstr(char **, int, char *, char *);
53 char *dropcomm(char *);
54
55 char *estr(int);
56 char *rstr(int);
57 int rconv(int *, char *);
58 int econv(int *, char *);
59
60 int eulp(double);
61 int eulpf(float);
62 int eulpl(long double);
63 double ulperr(double y, double ycr, double dy);
64
65 void setupfenv(int);
66 int getexcept(void);
67
68 #define T(f,x) int mp##f(struct t *);
69 #include "functions.h"
70 #undef T
71