login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

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.

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]
spad
   Compiling FriCAS source code from file 
      /var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/3743324978057018076-25px001.spad
      using old system compiler.
   PCDEN abbreviates package PolynomialCommonDenominator 
------------------------------------------------------------------------
   initializing NRLIB PCDEN for PolynomialCommonDenominator 
   compiling into NRLIB PCDEN 
   importing CommonDenominator(R,Q,List Q)
   compiling exported commonDenominator : P -> R
Time: 0.05 SEC.
compiling exported clearDenominator : P -> P Time: 0 SEC.
compiling exported splitDenominator : P -> Record(num: P,den: R) Time: 0 SEC.
(time taken in buildFunctor: 0)
;;; *** |PolynomialCommonDenominator| REDEFINED
;;; *** |PolynomialCommonDenominator| REDEFINED Time: 0.01 SEC.
Cumulative Statistics for Constructor PolynomialCommonDenominator Time: 0.06 seconds
finalizing NRLIB PCDEN Processing PolynomialCommonDenominator for Browser database: --->/usr/local/lib/fricas/target/x86_64-unknown-linux/../../src/algebra/PCDEN.spad-->PolynomialCommonDenominator(constructor): Not documented!!!! --------(commonDenominator (R P))--------- --------(clearDenominator (P P))--------- --------(splitDenominator ((Record (: num P) (: den R)) P))--------- --->/usr/local/lib/fricas/target/x86_64-unknown-linux/../../src/algebra/PCDEN.spad-->PolynomialCommonDenominator(): Missing Description ; compiling file "/var/aw/var/LatexWiki/PCDEN.NRLIB/PCDEN.lsp" (written 07 MAY 2016 12:57:05 PM):
; /var/aw/var/LatexWiki/PCDEN.NRLIB/PCDEN.fasl written ; compilation finished in 0:00:00.038 ------------------------------------------------------------------------ PolynomialCommonDenominator is now explicitly exposed in frame initial PolynomialCommonDenominator will be automatically loaded when needed from /var/aw/var/LatexWiki/PCDEN.NRLIB/PCDEN

Example use:

fricas
)set mess type off
dom:=DMP([x,y], FRAC DMP([z],INT));
p:dom:=x*y^3/(z^2-1) + 3*x*y/(z^3-1)

\label{eq1}{{1 \over{{{z}^{2}}- 1}}\  x \ {{y}^{3}}}+{{3 \over{{{z}^{3}}- 1}}\  x \  y}(1)
fricas
commonDenominator p

\label{eq2}{{z}^{4}}+{{z}^{3}}- z - 1(2)
fricas
clearDenominator p

\label{eq3}{{\left({{z}^{2}}+ z + 1 \right)}\  x \ {{y}^{3}}}+{{\left({3 \  z}+ 3 \right)}\  x \  y}(3)
fricas
splitDenominator p

\label{eq4}\begin{array}{@{}l}
\displaystyle
\left[{num ={{{\left({{z}^{2}}+ z + 1 \right)}\  x \ {{y}^{3}}}+{{\left({3 \  z}+ 3 \right)}\  x \  y}}}, \: \right.
\
\
\displaystyle
\left.{den ={{{z}^{4}}+{{z}^{3}}- z - 1}}\right] 
(4)




  Subject:   Be Bold !!
  ( 13 subscribers )  
Please rate this page: