home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
300-399
/
ff373.lzh
/
Multiplot
/
source
/
mplot_src
/
src.zoo
/
ffp.h
< prev
next >
Wrap
C/C++ Source or Header
|
1990-08-02
|
595b
|
30 lines
/* ffp.h */
#define FFP_H 1
#include <float.h>
#include <math.h>
typedef double FFP;
extern double atof(char *);
#define atoFFP(x) (FFP)atof(x)
#ifdef MAIN_MODULE
FFP FFPLARGE = 1.0e10, FFPSMALL = 1.0e-10;
#else
extern FFP FFPLARGE, FFPSMALL;
#endif
#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))