axiom-mail
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-mail] Re: negative integer exponents in polynomials


From: Perrin Meyer
Subject: [Axiom-mail] Re: negative integer exponents in polynomials
Date: Tue, 12 Aug 2008 17:56:49 -0700 (PDT)

I sent this email a few days ago, but yahoo email spam filter ate the email 
list confirmation, so I just found it.  The nice people on the FriCAS email 
list have meanwhile almost answered all my questions, but I'm still having 
trouble with eval()

Thanks,

Perrin Meyer


----- laupolerror.input -----------------
)clear completely
R ==> FRAC DMP([a0,a1,a2,b0,b1,b2,p],INT)
M ==> LAUPOL(R, UP(z,R))
f(s) == (b2 * s^2 + b1 * s + b0) / (a2 * s^2 + a1 * s + a0)
fz := f(p * ((z-1)/(z+1)))
fzn := numer(fz)
fzn2 := fzn / (a2 * p^2  + a1 * p + a0)
fzn3 := fzn2::UP(z,?)
fzn4 := fzn3::FRAC M::M
fzn5 := fzn4 * (z^(-2))::FRAC M::M
fzd := denom(fz)
fzd2 := fzd / (a2 * p^2  + a1 * p + a0)
fzd3 := fzd2::UP(z,?)
fzd4 := fzd3::FRAC M::M
fzd5 := fzd4 * (z^(-2))::FRAC M::M
ffinal := fzn5::FRAC M::M / fzd5::FRAC M::M
eval(ffinal,[a0=1.0,a1=1.0,a2=1.0,b0=1.0,b1=1.0,p=1.0,z=1.0])

[axiom output]

ffinal := fzn5::FRAC M::M / fzd5::FRAC M::M

   Loading
      
/home/perrin/cas/ax-install//lib/fricas/target/x86_64-unknown-linux/algebra/FRETRCT-.o
      for domain FullyRetractableTo&
   Loading
      
/home/perrin/cas/ax-install//lib/fricas/target/x86_64-unknown-linux/algebra/PRS.o
      for package PseudoRemainderSequence

                         2                 2                          2
         b0 + b1 p + b2 p       2b0 - 2b2 p     - 1   b0 - b1 p + b2 p   - 2
         ----------------- + ----------------- z    + ----------------- z
                         2                   2                        2
         a0 + a1 p + a2 p    a0 + a1 p + a2 p         a0 + a1 p + a2 p
   (15)  -------------------------------------------------------------------
                                   2                          2
                        2a0 - 2a2 p     - 1   a0 - a1 p + a2 p   - 2
                 1 + ----------------- z    + ----------------- z
                                     2                        2
                     a0 + a1 p + a2 p         a0 + a1 p + a2 p
Type: Fraction LaurentPolynomial(Fraction 
DistributedMultivariatePolynomial([a0,a1,a2,b0,b1,b2,p],Integer),UnivariatePolynomial(z,Fraction
 DistributedMultivariatePolynomial([a0,a1,a2,b0,b1,b2,p],Integer)))
eval(ffinal,[a0=1.0,a1=1.0,a2=1.0,b0=1.0,b1=1.0,p=1.0,z=1.0])

   Loading
      
/home/perrin/cas/ax-install//lib/fricas/target/x86_64-unknown-linux/algebra/FLOAT.o
      for domain Float
   Loading
      
/home/perrin/cas/ax-install//lib/fricas/target/x86_64-unknown-linux/algebra/EQ.o
      for domain Equation
   Loading
      
/home/perrin/cas/ax-install//lib/fricas/target/x86_64-unknown-linux/algebra/LIST2.o
      for package ListFunctions2
   Loading
      
/home/perrin/cas/ax-install//lib/fricas/target/x86_64-unknown-linux/algebra/FLAGG2.o
      for package FiniteLinearAggregateFunctions2
   Loading
      
/home/perrin/cas/ax-install//lib/fricas/target/x86_64-unknown-linux/algebra/EQ2.o
      for package EquationFunctions2
   There are 10 exposed and 4 unexposed library operations named eval
      having 2 argument(s) but none was determined to be applicable.
      Use HyperDoc Browse, or issue
                              )display op eval
      to learn more about the available operations. Perhaps
      package-calling the operation or using coercions on the arguments
      will allow you to apply the operation.

   Cannot find a definition or applicable library operation named eval
      with argument type(s)
Fraction LaurentPolynomial(Fraction 
DistributedMultivariatePolynomial([a0,a1,a2,b0,b1,b2,p],Integer),UnivariatePolynomial(z,Fraction
 DistributedMultivariatePolynomial([a0,a1,a2,b0,b1,b2,p],Integer)))
                       List Equation Polynomial Float

      Perhaps you should use "@" to indicate the required return type,
      or "$" to specify which version of the function you need.
(16) -> )quit




----- Forwarded Message ----
> From: Perrin Meyer <address@hidden>
> To: address@hidden
> Sent: Saturday, August 9, 2008 6:53:07 PM
> Subject: negative integer exponents in polynomials
> 
> 
> 
> Hi,
> 
> I'm new to axiom, which so far seems great.
> 
> How do I get axiom to display polynomials with negative integer exponents, 
> like
> 
> --> a + b * z^-1 + c * z^-2 
> 
> (DSP style). See below for a transcript. 
> 
> (I am using axiom on my Intel macbook 10.5 (I got sbcl and texmacs from 
> macports, and I compiled frimacs using sbcl.  I made a soft link between 
> /usr/local/bin/axiom and AXIOMsys, to get texmacs to work)
> 
> Thanks,
> 
> Perrin Meyer
> 
> → f := a*z^2 + b*z + c 
>
> a z2 + b z + c
> (1)
> Type: Polynomial Integer
> → f / z^2 
>
> a z2 + b z + c 
> z2 
> (2)
> Type: Fraction Polynomial Integer
> → % :: UP(z,?) 
>
> a 
> z2 z 2 +b 
> z2 z +c 
> z2 
> (3)
> Type: UnivariatePolynomial(z,Fraction Polynomial Integer)
>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]