summaryrefslogtreecommitdiff
path: root/math.c
diff options
context:
space:
mode:
Diffstat (limited to 'math.c')
-rw-r--r--math.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/math.c b/math.c
index 9b28ddbf60..b2d61f609c 100644
--- a/math.c
+++ b/math.c
@@ -65,8 +65,8 @@ math_exp(obj, x)
}
#if defined __CYGWIN__
-#define log(x) ((x) < 0.0 ? 0.0 / 0.0 : log(x))
-#define log10(x) ((x) < 0.0 ? 0.0 / 0.0 : log10(x))
+#define log(x) ((x) < 0.0 ? nan() : log(x))
+#define log10(x) ((x) < 0.0 ? nan() : log10(x))
#endif
static VALUE