Skip to content

Commit 9f99261

Browse files
committed
Fix "floating-point comparison is always false" clang error in jerry-math
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác [email protected]
1 parent 355ab24 commit 9f99261

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

jerry-math/include/math.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ extern "C" {
2222

2323
/* General Constants. */
2424
#ifdef _MSC_VER
25-
#define INFINITY ((float) (1e+300 * 1e+300)) /* 1e+300*1e+300 must overflow */
26-
#define NAN ((float) (INFINITY * 0.0f))
25+
#define INFINITY ((double) (1e+300 * 1e+300)) /* 1e+300*1e+300 must overflow */
26+
#define NAN ((double) (INFINITY * 0.0f))
2727
#else /* !_MSC_VER */
28-
#define INFINITY ((float) (1.0 / 0.0))
29-
#define NAN ((float) (0.0 / 0.0))
28+
#define INFINITY ((double) (1.0 / 0.0))
29+
#define NAN ((double) (0.0 / 0.0))
3030
#endif /* _MSC_VER */
3131
#define HUGE_VAL ((double) INFINITY)
3232

0 commit comments

Comments
 (0)