Use Cyc_expt()

This commit is contained in:
Justin Ethier 2017-02-17 00:03:07 -05:00
parent 268d59d15d
commit 284dc05128
2 changed files with 2 additions and 5 deletions

View file

@ -178,6 +178,7 @@ object Cyc_num_fast_lte_op(void *data, object x, object y);
object Cyc_num_cmp_va_list(void *data, int argc, object Cyc_num_cmp_va_list(void *data, int argc,
int (fn_op(void *, object, object)), object n, int (fn_op(void *, object, object)), object n,
va_list ns); va_list ns);
void Cyc_expt(void *data, object cont, object x, object y);
object Cyc_eq(object x, object y); object Cyc_eq(object x, object y);
object Cyc_set_cell(void *, object l, object val); object Cyc_set_cell(void *, object l, object val);
object Cyc_set_car(void *, object l, object val); object Cyc_set_car(void *, object l, object val);

View file

@ -1163,11 +1163,7 @@
(define (square z) (* z z)) (define (square z) (* z z))
(define-c expt (define-c expt
"(void *data, int argc, closure _, object k, object z1, object z2)" "(void *data, int argc, closure _, object k, object z1, object z2)"
" make_double(d, 0.0); " Cyc_expt(data, k, z1, z2); ")
Cyc_check_num(data, z1);
Cyc_check_num(data, z2);
d.value = pow( unbox_number(z1), unbox_number(z2) );
return_closcall1(data, k, &d); ")
(define-c eof-object (define-c eof-object
"(void *data, int argc, closure _, object k)" "(void *data, int argc, closure _, object k)"
" return_closcall1(data, k, Cyc_EOF); ") " return_closcall1(data, k, Cyc_EOF); ")