Define INFINITY when it's not defined

This commit is contained in:
Mike Hommey 2014-05-28 13:14:46 +09:00 committed by Jason Evans
parent 12f74e680c
commit 26246af977

View File

@ -3,6 +3,12 @@
#define MAX_REL_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
double_eq_rel(double a, double b, double max_rel_err, double max_abs_err)
{