diff --git a/src/c/numbers/expt.d b/src/c/numbers/expt.d index 1f206f99d..d35817df5 100644 --- a/src/c/numbers/expt.d +++ b/src/c/numbers/expt.d @@ -180,6 +180,7 @@ ecl_expt(cl_object x, cl_object y) /* rational ^ integer -> rational */ /* complex ^ integer -> complex/rational */ /* float ^ integer -> float */ + /* cfloat ^ integer -> cfloat */ /* ----------------------------------SECOND IF--- */ /* number ^ complex -> cfloat */ /* complex ^ number -> cfloat */ @@ -201,6 +202,12 @@ ecl_expt(cl_object x, cl_object y) case t_doublefloat: case t_singlefloat: return ecl_expt_float(x, y); +#ifdef ECL_COMPLEX_FLOAT + case t_clfloat: + case t_cdfloat: + case t_csfloat: + return ecl_expt_complex_float(x, y); +#endif default: ecl_internal_error("expt: unhandled switch branch."); } diff --git a/src/tests/ecl-tests.lisp b/src/tests/ecl-tests.lisp index cccf9751c..8863eed5b 100644 --- a/src/tests/ecl-tests.lisp +++ b/src/tests/ecl-tests.lisp @@ -20,13 +20,12 @@ ;;;; Declare the suites -(suite 'ecl-tests - '(executable ieee-fp eprocess package-ext hash-tables ansi+ mixed - cmp emb ffi mop mp run-program eformat complex)) - (suite 'make-check '(executable ieee-fp eprocess package-ext hash-tables ansi+ mixed - cmp emb ffi mop run-program mp)) + cmp emb ffi mop run-program mp complex)) + +(suite 'ecl-tests + '(make-check eformat)) (suite 'stress) (test stress.all (finishes (1am-ecl:run))) diff --git a/src/tests/normal-tests/complex.lsp b/src/tests/normal-tests/complex.lsp index 95851387a..fe716cd5f 100644 --- a/src/tests/normal-tests/complex.lsp +++ b/src/tests/normal-tests/complex.lsp @@ -288,4 +288,15 @@ (is (typep #c(1.0 0) 'si:complex-float)) (is (not (typep #c(1 1) 'si:complex-float))) (is (not (typep #c(0 1) 'si:complex-float))) - (is (not (typep #c(1 0) 'si:complex-float))))) + (is (not (typep #c(1 0) 'si:complex-float)))) + + ;; Date: 2019-12-30 + ;; URL: https://gitlab.com/embeddable-common-lisp/ecl/issues/547 + ;; From: Karsten Poeck + ;; Fixed: 2019-12-30 (Daniel KochmaƄski) + ;; Description: + ;; + ;; (EXPT #C(1.0 0.0) 2) causes unrecoverable error. + ;; + (test csfloat.0010.issue-547 + (finishes (expt #c(1.0 0.0) 2))))