diff options
Diffstat (limited to 'complex.c')
-rw-r--r-- | complex.c | 15 |
1 files changed, 0 insertions, 15 deletions
@@ -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); |