summaryrefslogtreecommitdiff
path: root/math.c
diff options
context:
space:
mode:
Diffstat (limited to 'math.c')
-rw-r--r--math.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/math.c b/math.c
index ac87b9c8dc..2cac83e938 100644
--- a/math.c
+++ b/math.c
@@ -64,6 +64,11 @@ math_exp(obj, x)
return rb_float_new(exp(RFLOAT(x)->value));
}
+#if defined __CYGWIN__
+#define log(x) ((x) < 0.0 ? nan() : log(x))
+#define log10(x) ((x) < 0.0 ? nan() : log10(x))
+#endif
+
static VALUE
math_log(obj, x)
VALUE obj, x;