Axiom Computer Algebra System - Bugs: bug #5785, partialFraction((2*x^3)::UP(x,...
You are not allowed to post comments on this tracker with your current authentication level.
bug #5785: partialFraction((2*x^3)::UP(x, FRAC INT), (1-x^2)) is not correctly expanded
Submitter: | David Mentré <dmentre> | ||
Submitted: | Tue 07 Oct 2003 05:51:42 PM UTC | ||
Category: | interpreter | Severity: | 2 - Minor |
Item Group: | code bug | Status: | transferred |
Privacy: | Public | Assigned to: | None |
Originator Name: | Dylan Thurston | Open/Closed: | Open |
Release: | Tue, 7 Oct 2003 12:56:51 -0400 | Reproducibility: | Every Time |
Fixed Release: | |||
Error message: |
|
||
Example of code trigerring the bug: |
|
||
Internal cause: |
|
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Dylan Thurston wrote:
Dylan,
(1) -> )d op partialFraction
There is one exposed function called partialFraction :
[1] (D1,Factored D1) -> PartialFraction D1 from PartialFraction D1
if D1 has EUCDOM
There are 2 unexposed functions called partialFraction :
[1] (Fraction Polynomial D4,Symbol) -> Any from
PartialFractionPackage D4
if D4 has Join(EuclideanDomain,CharacteristicZero)
[2] (Polynomial D5,Factored Polynomial D5,Symbol) -> Any
from PartialFractionPackage D5
if D5 has Join(EuclideanDomain,CharacteristicZero)
First, I make a couple variables to hold the expressions.
This lets me figure out what the interpreter type is by default:
(1) -> a:=2*x^3
3
(1) 2x
Type: Polynomial Integer
(2) -> b:=1-x^2
2
(2) - x + 1
Type: Polynomial Integer
The signature listed above requires that the first argument type
must be a EuclideanDomain (EUCDOM):
(3) -> Polynomial(Integer) has EUCDOM
(3) false
Type: Boolean
POLY(INT) is not a EUCDOM.
However, the type you provided is a EUCDOM.
(4) -> UP(x,FRAC INT) has EUCDOM
(4) true
Type: Boolean
So we can make variables that are the correct type:
(5) -> aa:UP(x,FRAC INT):=2*x^3
3
(5) 2x
Type: UnivariatePolynomial(x,Fraction Integer)
(6) -> bb:UP(x,FRAC INT):=1-x^2
2
(6) - x + 1
Type: UnivariatePolynomial(x,Fraction Integer)
And the call succeeds:
(7) -> partialFraction(aa,bb)
1 1
(7) - 2x - ----- - -----
x - 1 x + 1
Type: PartialFraction UnivariatePolynomial(x,Fraction Integer)
So partialFraction can create the correct call signature. I suspect the
interpreter created some intermediate type that it couldn't coerce to
the required target type. I agree that it should have been able to
give the factored output but did not.