mirror of
https://github.com/gnustep/tools-make.git
synced 2025-05-05 19:30:55 +00:00
fixup for near-equality test
This commit is contained in:
parent
2e41a77191
commit
96e81d23c6
1 changed files with 2 additions and 1 deletions
|
@ -564,7 +564,8 @@ static void testStart()
|
|||
/* some good macros to compare floating point numbers */
|
||||
#import <math.h>
|
||||
#import <float.h>
|
||||
#define EQ(x, y) (fabs((x) - (y)) <= fabs((x) + (y)) * (FLT_EPSILON * 100))
|
||||
#define EQ(x, y) \
|
||||
(((x) >= ((y) - FLT_EPSILON*100)) && ((x) <= ((y) + FLT_EPSILON*100)))
|
||||
#define LE(x, y) ((x)<(y) || EQ(x, y))
|
||||
#define GE(x, y) ((y)<(x) || EQ(x, y))
|
||||
#define LT(x, y) (!GE(x, y))
|
||||
|
|
Loading…
Reference in a new issue