From fa9e71f17c42b0a0c22468723c4d9c4fa7bfa03e Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Fri, 11 May 2018 14:23:46 -0400 Subject: [PATCH] WIP --- runtime.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/runtime.c b/runtime.c index 5027c795..79ec414b 100644 --- a/runtime.c +++ b/runtime.c @@ -3083,15 +3083,16 @@ object FUNC_OP(void *data, common_type *x, object y) { \ } else if (tx == complex_num_tag && ty == integer_tag) { \ /* TODO: need to add support!! */ goto bad_arg_type_error; \ } else if (tx == complex_num_tag && ty == bignum_tag) { \ - /* TODO: need to add support!! */ goto bad_arg_type_error; \ + x->complex_num_t.value = x->complex_num_t.value OP mp_get_double(&bignum_value(y)); \ } else if (tx == complex_num_tag && ty == double_tag) { \ - /* TODO: need to add support!! */ goto bad_arg_type_error; \ + x->complex_num_t.value = x->complex_num_t.value OP complex_num_value(y); \ } else if (tx == integer_tag && ty == complex_num_tag) { \ /* TODO: need to add support!! */ goto bad_arg_type_error; \ } else if (tx == bignum_tag && ty == complex_num_tag) { \ /* TODO: need to add support!! */ goto bad_arg_type_error; \ } else if (tx == double_tag && ty == complex_num_tag) { \ - /* TODO: need to add support!! */ goto bad_arg_type_error; \ + x->complex_num_t.value = x->double_t.value OP complex_num_value(y); \ + x->complex_num_t.tag = complex_num_tag; \ } else { \ goto bad_arg_type_error; \ } \