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 | fc07b3b0ad1415ab93352246474251dd97700423 (patch) | |
tree | ce12d3c56d0a5ebf13bba44b2750b4883c2a1a87 /math.c | |
parent | 93868607a2e19349e9ba3e3eba28698121d7b296 (diff) | |
download | ruby-fc07b3b0ad1415ab93352246474251dd97700423.tar.gz |
* 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/trunk@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; |