diff options
author | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-03-07 05:43:11 +0000 |
---|---|---|
committer | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-03-07 05:43:11 +0000 |
commit | ce9a8bd9c26fb883219d7135d2d613b16577ac26 (patch) | |
tree | 396383e8e17a5ba682218d7d6ca28ce359e6052f /math.c | |
parent | 17b624e1da00030d95bc6b6171e3aa6c8a511f55 (diff) |
* math.c (math_log, math_log10): should return NaN if x < 0.0
on Cygwin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'math.c')
-rw-r--r-- | math.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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 ? 0.0 / 0.0 : log(x)) +#define log10(x) ((x) < 0.0 ? 0.0 / 0.0 : log10(x)) +#endif + static VALUE math_log(obj, x) VALUE obj, x; |