diff --git a/basis/math/functions/functions-tests.factor b/basis/math/functions/functions-tests.factor index 66d813bab8..0bdc6ce00b 100644 --- a/basis/math/functions/functions-tests.factor +++ b/basis/math/functions/functions-tests.factor @@ -162,3 +162,4 @@ IN: math.functions.tests [ 2.5 ] [ 1.0 2.5 1.0 lerp ] unit-test [ 1.75 ] [ 1.0 2.5 0.5 lerp ] unit-test +[ C{ 1 2 } ] [ C{ 1 2 } 1 ^ ] unit-test \ No newline at end of file diff --git a/basis/math/functions/functions.factor b/basis/math/functions/functions.factor index a1bf9480d5..5d88eba9fa 100644 --- a/basis/math/functions/functions.factor +++ b/basis/math/functions/functions.factor @@ -34,8 +34,9 @@ M: integer ^n M: ratio ^n [ >fraction ] dip [ ^n ] curry bi@ / ; -M: float ^n - (^n) ; +M: float ^n (^n) ; + +M: complex ^n (^n) ; : integer^ ( x y -- z ) dup 0 > [ ^n ] [ neg ^n recip ] if ; inline