 
 M: real exp >float exp ; inline
 
-M: complex exp >rect swap exp swap polar> ; inline
+M: complex exp >rect [ exp ] dip polar> ; inline
 
 <PRIVATE
 

GENERIC# ^n 1 ( z w -- z^w ) foldable

: (^n) ( z w -- z^w )
    make-bits 1 [ [ dupd * ] when [ sq ] dip ] reduce nip ; inline

M: integer ^n
    [ factor-2s ] dip [ (^n) ] keep rot * shift ;

M: ratio ^n
    [ >fraction ] dip [ ^n ] curry bi@ / ;

M: float ^n (^n) ;


! Copyright (C) 2004, 2010 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: math kernel math.constants math.private math.bits
math.libm combinators fry math.order sequences ;
IN: math.functions

: >fraction ( a/b -- a b )
