regex memory corruption regression 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 t {
31         int type;
32         int r;
33         long double x;
34         long double x2;
35         long double x3;
36         long long i;
37         long double y;
38         long double y2;
39         float dy;
40         float dy2;
41         int e;
42 };
43
44 char *skipstr(char *, char *);
45 int splitstr(char **, int, char *, char *);
46 char *dropcomm(char *);
47
48 char *estr(int);
49 char *rstr(int);
50 int rconv(int *, char *);
51 int econv(int *, char *);
52
53 int eulp(double);
54 int eulpf(float);
55 int eulpl(long double);
56 double ulperr(double y, double ycr, double dy);
57
58 void setupfenv(int);
59 int getexcept(void);
60
61 #define T(f,x) int mp##f(struct t *);
62 #include "functions.h"
63 #undef T
64