Ralf Hemmecke <[email protected]> writes:

| Does someone have an idea, why I get DirectProduct below?
| I would have accepted, if it fails. (Actually it shouldn't since
| coercing to Fraction(...) should have been easy. But I agree, it's
| inside the argument of a type (SquareMatrix), so a bit tricky.)
| 
| Anyway, the interpreter seems to use
| 
| *: (DirectProduct(2, R), %) -> DirectProduct(2,R)
| 
| So it converts
| 
| (101) -> ((20 + 97*%i)*x + 4*%i)::
| DirectProduct(2,Fraction(Polynomial(Complex(Integer))))
| 
|    (101)  [(20 + 97%i)x + 4%i,(20 + 97%i)x + 4%i]
| 
| Why does the interpreter consider that to be easier than converting my
| element just to Fraction(Polynomial(Complex(Integer))) and do the right
| thing?
| 
| Strange...
| 
| Ralf
| 
| 
| (98) -> p::SquareMatrix(2, Fraction Polynomial(Complex Integer))
| 
|          +(5 + 12%i)x + %i  (- 21 - 14%i)x+
|    (98)  |                                |
|          + (- 21 - 14%i)x      49x + 4    +
|                  Type:
| SquareMatrix(2,Fraction(Polynomial(Complex(Integer))))
| (99) -> inverse(%)
| 
|          +      49x + 4          (21 + 14%i)x   +
|          |------------------  ------------------|
|          |(20 + 97%i)x + 4%i  (20 + 97%i)x + 4%i|
|    (99)  |                                      |
|          |   (21 + 14%i)x      (5 + 12%i)x + %i |
|          |------------------  ------------------|
|          +(20 + 97%i)x + 4%i  (20 + 97%i)x + 4%i+
|       Type:
| Union(SquareMatrix(2,Fraction(Polynomial(Complex(Integer)))),...)
| (97) -> (((20 + 97*%i)*x + 4*%i)::Fraction(Polynomial(Complex Integer)))*%
| 
|          +  49x + 4       (21 + 14%i)x  +
|    (97)  |                              |
|          +(21 + 14%i)x  (5 + 12%i)x + %i+
|                  Type:
| SquareMatrix(2,Fraction(Polynomial(Complex(Integer))))
| (100) -> ((20 + 97*%i)*x + 4*%i) * %
| 
|    (100)  [(70 + 14%i)x + 4,(26 + 26%i)x + %i]
|                 Type:
| DirectProduct(2,Fraction(Polynomial(Complex(Integer))))

Sounds familiar:

  
http://sourceforge.net/mailarchive/message.php?msg_name=877hmdxxmu.fsf%40gauss.cs.tamu.edu

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en.

Reply via email to