mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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/trunk@1238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4dae731bbd
commit
15d67fba62
3 changed files with 8 additions and 4 deletions
4
math.c
4
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue