Define INFINITY when it's not defined
This commit is contained in:
parent
12f74e680c
commit
26246af977
@ -3,6 +3,12 @@
|
|||||||
#define MAX_REL_ERR 1.0e-9
|
#define MAX_REL_ERR 1.0e-9
|
||||||
#define MAX_ABS_ERR 1.0e-9
|
#define MAX_ABS_ERR 1.0e-9
|
||||||
|
|
||||||
|
#include <float.h>
|
||||||
|
|
||||||
|
#ifndef INFINITY
|
||||||
|
#define INFINITY (DBL_MAX + DBL_MAX)
|
||||||
|
#endif
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
double_eq_rel(double a, double b, double max_rel_err, double max_abs_err)
|
double_eq_rel(double a, double b, double max_rel_err, double max_abs_err)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user