home *** CD-ROM | disk | FTP | other *** search
- /* ffp.h */
-
- #define FFP_H 1
- #include <float.h>
- #include <math.h>
-
- typedef float FFP;
- #define FASTFLOAT
- #ifndef FASTFLOAT
- extern double atof(char *);
- #define atoFFP(x) atof(x)
- #else
- extern FFP atoFFP(char *);
- #endif
-
- extern FFP FFPLARGE, FFPSMALL;
-
- #ifndef max
- #define max(a,b) (((a)>(b)) ? (a) : (b))
- #define min(a,b) (((a)>(b)) ? (b) : (a))
- #endif
-
- #define NINT(a) ((int)((a)>=0 ? (a)+0.5 : (a)-0.5))
-
- /* a AND b DIFFER BY LESS THAN DEFAULT TOLERANCE ? */
- #define FFPSAME(a,b) (abs((a)-(b)) <= FFPSMALL)
-
- /* a AND b DIFFER BY LESS THAN c */
- #define FFPNEAR(a,b,c) (abs((a)-(b)) <= (c))
-
-