mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* math.c (domain_check): check errno first.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
12278f0b70
commit
441619b73c
2 changed files with 8 additions and 4 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Sun Jan 17 19:24:25 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* math.c (domain_check): check errno first.
|
||||||
|
|
||||||
Sun Jan 17 14:24:35 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sun Jan 17 14:24:35 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* ext/iconv/iconv.c (rb_str_derive): use long.
|
* ext/iconv/iconv.c (rb_str_derive): use long.
|
||||||
|
|
8
math.c
8
math.c
|
@ -27,10 +27,10 @@ extern VALUE rb_to_float(VALUE val);
|
||||||
static void
|
static void
|
||||||
domain_check(double x, double y, const char *msg)
|
domain_check(double x, double y, const char *msg)
|
||||||
{
|
{
|
||||||
if (!isnan(y)) return;
|
if (!errno) {
|
||||||
else if (isnan(x)) return;
|
if (!isnan(y)) return;
|
||||||
else {
|
else if (isnan(x)) return;
|
||||||
if (!errno) {
|
else {
|
||||||
#if defined(EDOM)
|
#if defined(EDOM)
|
||||||
errno = EDOM;
|
errno = EDOM;
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in a new issue