This commit is contained in:
Justin Ethier 2023-08-17 19:56:41 -07:00
parent fd56e21e90
commit ca931300e3

View file

@ -1854,7 +1854,15 @@ int FUNC_OP(void *data, object x, object y) { \
} else if (tx == double_tag && ty == bignum_tag) { \
result = (double_value(x)) OP mp_get_double(&bignum_value(y)); \
} else if (tx == complex_num_tag && ty == complex_num_tag) { \
if (BN_CMP == CYC_BN_EQ) { \
result = (complex_num_value(x)) == (complex_num_value(y)); \
} else { \
make_string(s, "Complex comparison operation not allowed"); \
make_pair(c2, y, NULL); \
make_pair(c1, x, &c2); \
make_pair(c0, &s, &c1); \
Cyc_rt_raise(data, &c0); \
} \
} else if (tx == complex_num_tag && ty != complex_num_tag) { \
} else if (tx != complex_num_tag && ty == complex_num_tag) { \
} else { \
@ -1932,7 +1940,16 @@ object FUNC_FAST_OP(void *data, object x, object y) { \
} else if (tx == double_tag && ty == bignum_tag) { \
return (double_value(x)) OP mp_get_double(&bignum_value(y)) ? boolean_t : boolean_f; \
} else if (tx == complex_num_tag && ty == complex_num_tag) { \
if (BN_CMP == CYC_BN_EQ) { \
return ((complex_num_value(x)) == (complex_num_value(y))) ? boolean_t : boolean_f; \
} else { \
make_string(s, "Complex comparison operation not allowed"); \
make_pair(c2, y, NULL); \
make_pair(c1, x, &c2); \
make_pair(c0, &s, &c1); \
Cyc_rt_raise(data, &c0); \
return NULL; \
} \
} else if (tx == complex_num_tag && ty != complex_num_tag) { \
return boolean_f; \
} else if (tx != complex_num_tag && ty == complex_num_tag) { \