[fricas-devel] Real and image part of expressions

8 views
Skip to first unread message

Alexandr Batalshikov

unread,
Oct 16, 2010, 1:50:42 PM10/16/10
to fricas...@googlegroups.com
Hello, 
I try:

-> real(%i^%i)
 
   >> Error detected within library code:
   ker2trigs: cannot convert kernel to gaussian function

I expect to get exp(-%pi/2) but get this error.
This is normal?

-- 
Alexander Batalshikov

Waldek Hebisch

unread,
Oct 16, 2010, 3:14:19 PM10/16/10
to fricas...@googlegroups.com
Alexander Batalshikov wrote:
>
> Hello,
> I try:
>
> -> real(%i^%i)
>
> >> Error detected within library code:
> ker2trigs: cannot convert kernel to gaussian function
>
> I expect to get exp(-%pi/2) but get this error.
> This is normal?
>

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

Alexandr Batalshikov

unread,
Oct 18, 2010, 9:51:45 AM10/18/10
to fricas...@googlegroups.com
Many thanks.

-- 
Alexander Batalshikov
Reply all
Reply to author
Forward
0 new messages