04-16-2017, 05:11 PM
Expressions converting to the form x + y * i are easier to read, I suggest please that the CAS incorporate the following commands
collectxyi( (1+i/(sqrt(2)+1))*sqrt(sqrt(2)+1)/(sqrt(2)) ); ->
(√(2)*√(√(2)+1)/2) + (√(2)*√(√(2)-1)/2) * i
PHP Code:
#cas
collectxyi(exprIn):=
begin
return normal(re(exprIn)) + normal(im(exprIn))*i;
end;
#end
#cas
collectxyi2(exprIn):=
begin
return re(exprIn) + im(exprIn)*i;
end;
#end
collectxyi( (1+i/(sqrt(2)+1))*sqrt(sqrt(2)+1)/(sqrt(2)) ); ->
(√(2)*√(√(2)+1)/2) + (√(2)*√(√(2)-1)/2) * i