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 30struct 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 44char *skipstr(char *, char *); 45int splitstr(char **, int, char *, char *); 46char *dropcomm(char *); 47 48char *estr(int); 49char *rstr(int); 50int rconv(int *, char *); 51int econv(int *, char *); 52 53int eulp(double); 54int eulpf(float); 55int eulpl(long double); 56double ulperr(double y, double ycr, double dy); 57 58void setupfenv(int); 59int getexcept(void); 60 61#define T(f,x) int mp##f(struct t *); 62#include "functions.h" 63#undef T 64 65