aboutsummaryrefslogtreecommitdiffstats
path: root/rational.c
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-20 03:16:59 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-20 03:16:59 +0000
commita91825967fc7a2fe2c9d2df3de5fe4455835ec9f (patch)
treefa81b2fb7d4c4341125ccc830764c18da15339c9 /rational.c
parent32eab2c92883320cfcbbfa7b684f954506385787 (diff)
downloadruby-a91825967fc7a2fe2c9d2df3de5fe4455835ec9f.tar.gz
add missing/nan.c
instead of scattering #ifdef HAVE_NANF here and there define our own nan() unless defined elsewhere. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'rational.c')
-rw-r--r--rational.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/rational.c b/rational.c
index c1c1081446..d82d487d51 100644
--- a/rational.c
+++ b/rational.c
@@ -1073,11 +1073,7 @@ nurat_expt(VALUE self, VALUE other)
}
if (RB_FLOAT_TYPE_P(num)) { /* infinity due to overflow */
if (RB_FLOAT_TYPE_P(den))
-#ifdef HAVE_NANF
return DBL2NUM(nan(""));
-#else
- return DBL2NUM((double)NAN);
-#endif
return num;
}
if (RB_FLOAT_TYPE_P(den)) { /* infinity due to overflow */