This is a limitation of current implementation. Try:
(4) -> real(normalize(%i^%i))
1
(4) -----
%pi
---
2
%e
Apparently real was originally written to work on output of
normalize.
I will look at this problem, but I am not sure how much can be done
quickly. Currently real tries hard to produce simple answer. In
general I am affraid it is hard to do better than
'(%i^%i + (-%i)^(-%i))/2)', that is average of expression and
its conjugate. However, such answer while mathematically correct
in FriCAS would be more or less incorrect, because real is supposed
to elliminate all complex subexpressions.
--
Waldek Hebisch
heb...@math.uni.wroc.pl