summaryrefslogtreecommitdiff
path: root/math.c
diff options
context:
space:
mode:
Diffstat (limited to 'math.c')
-rw-r--r--math.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/math.c b/math.c
index 4d294bfbbb..bc6b7eb333 100644
--- a/math.c
+++ b/math.c
@@ -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