summaryrefslogtreecommitdiff
path: root/math.c
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-03-09 17:49:31 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-03-09 17:49:31 +0000
commit8c5c412404f7efdc7f9f984ec8dc2a360421489f (patch)
treeba8c49e901693fb912615bc73c12d6205b03e26c /math.c
parent5c630f2024054fe056764d1031d1394dca98012f (diff)
* math.c (math_log, math_log10): use nan() instead of 0.0/0.0 on Cygwin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 6bdc7422e1..2cac83e938 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