|
1
2
3
|
|
Editor: test1
Time: 2018/04/13 15:44:45 GMT+0
|
Note:
|
changed:
-Note: Common denominator in FriCAS is extended in such a way.
-
-This package extends UnivariatePolynomialCommonDenominator for arbitrary polynomial categories. In fact, I don't understand why the original package is so restrictive.
-
-\begin{spad}
-)abbrev package PCDEN PolynomialCommonDenominator
-PolynomialCommonDenominator(R, Q, P, E, VarSet): Exports == Impl where
- R : IntegralDomain
- Q : QuotientFieldCategory R
- E : OrderedAbelianMonoidSup
- VarSet: OrderedSet
- P: PolynomialCategory(Q, E,VarSet)
-
- Exports ==> with
- commonDenominator: P -> R
- ++ commonDenominator(q) returns a common denominator d for
- ++ the coefficients of q.
- clearDenominator : P -> P
- ++ clearDenominator(q) returns p such that \spad{q = p/d} where d is
- ++ a common denominator for the coefficients of q.
- splitDenominator : P -> Record(num: P, den: R)
- ++ splitDenominator(q) returns \spad{[p, d]} such that \spad{q = p/d} and d
- ++ is a common denominator for the coefficients of q.
-
- Impl ==> add
- import CommonDenominator(R, Q, List Q)
-
- commonDenominator p == commonDenominator coefficients p
-
- clearDenominator p ==
- d := commonDenominator p
- map(numer(d * #1)::Q, p)
-
- splitDenominator p ==
- d := commonDenominator p
- [map(numer(d * #1)::Q, p), d]
-\end{spad}
This page presented extension of UnivariatePolynomialCommonDenominator for arbitrary polynomial categories. FriCAS now
contains such extension, so we just present an example.
added:
)expose PCDEN
This page presented extension of UnivariatePolynomialCommonDenominator? for arbitrary polynomial categories. FriCAS now
contains such extension, so we just present an example.
Example use:
fricas
(1) -> )set mess type off
fricas
)expose PCDEN
PolynomialCommonDenominator is now explicitly exposed in frame
initial
dom:=DMP([x,y], FRAC DMP([z],INT));
p:dom:=x*y^3/(z^2-1) + 3*x*y/(z^3-1)
fricas
commonDenominator p
fricas
clearDenominator p
fricas
splitDenominator p