diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-01-17 10:24:27 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-01-17 10:24:27 +0000 |
commit | 441619b73c171bbd808d2bf9125c6bed29fddc74 (patch) | |
tree | f097bfa601c0ee63ced2d4279b27c781e2411fec /math.c | |
parent | 12278f0b70e2a395817653e8b40dbcef0f94bed6 (diff) |
* math.c (domain_check): check errno first.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'math.c')
-rw-r--r-- | math.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -27,10 +27,10 @@ extern VALUE rb_to_float(VALUE val); static void domain_check(double x, double y, const char *msg) { - if (!isnan(y)) return; - else if (isnan(x)) return; - else { - if (!errno) { + if (!errno) { + if (!isnan(y)) return; + else if (isnan(x)) return; + else { #if defined(EDOM) errno = EDOM; #else |