XFORM_NONGCING static MZ_INLINE int long_double_eqv(long double a, long double b) { # ifndef NAN_EQUALS_ANYTHING if (a != b) { # endif /* Double-check for NANs: */ if (MZ_IS_LONG_NAN(a)) { if (MZ_IS_LONG_NAN(b)) return 1; # ifdef NAN_EQUALS_ANYTHING return 0; # endif } # ifdef NAN_EQUALS_ANYTHING if (MZ_IS_LONG_NAN(b)) return 0; else { if (a == 0.0L) { if (b == 0.0L) { return scheme_long_minus_zero_p(a) == scheme_long_minus_zero_p(b); } } return (a == b); } # else return 0; } if (a == 0.0L) { if (b == 0.0L) { return scheme_long_minus_zero_p(a) == scheme_long_minus_zero_p(b); } } return 1; # endif }
XFORM_NONGCING static MZ_INLINE int mz_long_double_eqv(long_double a, long_double b) { # ifndef NAN_EQUALS_ANYTHING if (!long_double_eqv(a, b)) { # endif /* Double-check for NANs: */ if (MZ_IS_LONG_NAN(a)) { if (MZ_IS_LONG_NAN(b)) return 1; # ifdef NAN_EQUALS_ANYTHING return 0; # endif } # ifdef NAN_EQUALS_ANYTHING if (MZ_IS_LONG_NAN(b)) return 0; else { if (long_double_eqv(a, get_long_double_zero())) { if (long_double_eqv(b, get_long_double_zero())) { return scheme_long_minus_zero_p(a) == scheme_long_minus_zero_p(b); } } return long_double_eqv(a, b); } # else return 0; } if (long_double_eqv(a, get_long_double_zero())) { if (long_double_eqv(b, get_long_double_zero())) { return scheme_long_minus_zero_p(a) == scheme_long_minus_zero_p(b); } } return 1; # endif }