mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
Math is hard. Let's go shopping.
Alternatively, we could use fabs() to determine the absolute value of
floating point arguments.
The author of commit b6a30dcdd3
("Improve floating point equality
test") clearly has a rather loose definition of "improve". And the
maintainer who accepted that patch shares the blame...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
cdb69aea09
commit
f3c84ccf75
1 changed files with 1 additions and 1 deletions
2
dive.h
2
dive.h
|
@ -21,7 +21,7 @@
|
|||
(void) (&_max1 == &_max2); \
|
||||
_max1 > _max2 ? _max1 : _max2; })
|
||||
|
||||
#define IS_FP_SAME(_a,_b) (abs((_a) - (_b)) < 0.000001 * MAX(abs(_a), abs(_b)))
|
||||
#define IS_FP_SAME(_a,_b) (fabs((_a) - (_b)) < 0.000001 * MAX(fabs(_a), fabs(_b)))
|
||||
|
||||
#include <libxml/tree.h>
|
||||
#include <libxslt/transform.h>
|
||||
|
|
Loading…
Reference in a new issue