summaryrefslogtreecommitdiff
path: root/complex.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-12 00:45:06 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-12 00:45:06 +0000
commit27f953bfad3b604ae9023a0b9996948c2b3b2982 (patch)
tree07f23da095fc16abd69dbaf0e08b0d82a7809e69 /complex.c
parent772acb9f1d17d603030cde5660b2ff8773297be5 (diff)
* complex.c (f_signbit): remove condition for signbit because
all platforms have signbit from r26871. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'complex.c')
-rw-r--r--complex.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/complex.c b/complex.c
index eee1186d8f..64ea345862 100644
--- a/complex.c
+++ b/complex.c
@@ -1154,28 +1154,13 @@ nucomp_eql_p(VALUE self, VALUE other)
return Qfalse;
}
-#ifndef HAVE_SIGNBIT
-#ifdef signbit
-#define HAVE_SIGNBIT 1
-#endif
-#endif
-
inline static VALUE
f_signbit(VALUE x)
{
switch (TYPE(x)) {
case T_FLOAT: {
-#ifdef HAVE_SIGNBIT
double f = RFLOAT_VALUE(x);
return f_boolcast(!isnan(f) && signbit(f));
-#else
- char s[2];
- double f = RFLOAT_VALUE(x);
-
- if (isnan(f)) return Qfalse;
- (void)snprintf(s, sizeof s, "%.0f", f);
- return f_boolcast(s[0] == '-');
-#endif
}
}
return f_negative_p(x);