1 /* -*- Mode: MACSYMA -*- */
5 SUBST("^" = LAMBDA([A,B],
6 IF EVENP(DENOM(B)) AND NOT ATOM(A) AND INPART(A,0) = "+"
7 AND (MAX:MAX(FIRST(A),REST(A)),
9 NUMBERP(DISCR:SQRT(1-(MIN/MAX)^2)))
10 THEN (SQRT(MAX*(1+DISCR)/2)+SIGNUM(MIN)*SQRT(MAX*(1-DISCR)/2))^(2*B)