mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-04 03:36:34 +02:00
WIP
This commit is contained in:
parent
fd56e21e90
commit
ca931300e3
1 changed files with 19 additions and 2 deletions
21
runtime.c
21
runtime.c
|
@ -1854,7 +1854,15 @@ int FUNC_OP(void *data, object x, object y) { \
|
||||||
} else if (tx == double_tag && ty == bignum_tag) { \
|
} else if (tx == double_tag && ty == bignum_tag) { \
|
||||||
result = (double_value(x)) OP mp_get_double(&bignum_value(y)); \
|
result = (double_value(x)) OP mp_get_double(&bignum_value(y)); \
|
||||||
} else if (tx == complex_num_tag && ty == complex_num_tag) { \
|
} else if (tx == complex_num_tag && ty == complex_num_tag) { \
|
||||||
result = (complex_num_value(x)) == (complex_num_value(y)); \
|
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 if (tx != complex_num_tag && ty == complex_num_tag) { \
|
} else if (tx != complex_num_tag && ty == complex_num_tag) { \
|
||||||
} else { \
|
} else { \
|
||||||
|
@ -1932,7 +1940,16 @@ object FUNC_FAST_OP(void *data, object x, object y) { \
|
||||||
} else if (tx == double_tag && ty == bignum_tag) { \
|
} else if (tx == double_tag && ty == bignum_tag) { \
|
||||||
return (double_value(x)) OP mp_get_double(&bignum_value(y)) ? boolean_t : boolean_f; \
|
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) { \
|
} else if (tx == complex_num_tag && ty == complex_num_tag) { \
|
||||||
return ((complex_num_value(x)) == (complex_num_value(y))) ? boolean_t : boolean_f; \
|
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) { \
|
} else if (tx == complex_num_tag && ty != complex_num_tag) { \
|
||||||
return boolean_f; \
|
return boolean_f; \
|
||||||
} else if (tx != complex_num_tag && ty == complex_num_tag) { \
|
} else if (tx != complex_num_tag && ty == complex_num_tag) { \
|
||||||
|
|
Loading…
Add table
Reference in a new issue