* 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
This commit is contained in:
parent
93868607a2
commit
fc07b3b0ad
@ -1,3 +1,8 @@
|
|||||||
|
Wed Mar 7 14:26:11 2001 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||||
|
|
||||||
|
* math.c (math_log, math_log10): should return NaN if x < 0.0
|
||||||
|
on Cygwin.
|
||||||
|
|
||||||
Tue Mar 6 10:50:29 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Tue Mar 6 10:50:29 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* parse.y (primary): rescue and ensure clauses should be allowed
|
* parse.y (primary): rescue and ensure clauses should be allowed
|
||||||
|
5
math.c
5
math.c
@ -64,6 +64,11 @@ math_exp(obj, x)
|
|||||||
return rb_float_new(exp(RFLOAT(x)->value));
|
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
|
static VALUE
|
||||||
math_log(obj, x)
|
math_log(obj, x)
|
||||||
VALUE obj, x;
|
VALUE obj, x;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#define RUBY_VERSION "1.7.0"
|
#define RUBY_VERSION "1.7.0"
|
||||||
#define RUBY_RELEASE_DATE "2001-03-06"
|
#define RUBY_RELEASE_DATE "2001-03-07"
|
||||||
#define RUBY_VERSION_CODE 170
|
#define RUBY_VERSION_CODE 170
|
||||||
#define RUBY_RELEASE_CODE 20010306
|
#define RUBY_RELEASE_CODE 20010307
|
||||||
|
Loading…
x
Reference in New Issue
Block a user