sqrt(-1) and %i

"Bill Page" <[email protected]>
Newsgroups gmane.comp.mathematics.axiom.user
Message-ID <[email protected]>
Dear Axiom users;

I have a problem converting expressions involving sqrt(-1) to
expressions involving complex numbers and the symbol %i.

For example this works:

(2) -> p:=sin(1)*sqrt(-1)

               +---+
   (2)  sin(1)\|- 1
                                                     Type: Expression Integer

(3) -> p::Expression Complex Integer

   (3)  %i sin(1)
                                       Type: Expression Complex Integer

but not if through some more complex computation I end up with a type like this:

(4) -> q:Expression Fraction Integer:=sin(1)*sqrt(-1)

               +---+
   (4)  sin(1)\|- 1
                                        Type: Expression Fraction Integer

(5) -> q::Expression Complex Fraction Integer

   Cannot convert from type Expression Fraction Integer to Expression
      Complex Fraction Integer for value
          +---+
   sin(1)\|- 1

-------

Can anyone find a way to accomplish this coercion?

Regards,
Bill Page.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.