axiom-developer
[Top][All Lists]
Advanced

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

Re: [Axiom-developer] output format


From: Daniel Augot
Subject: Re: [Axiom-developer] output format
Date: Wed, 09 Jun 2004 14:30:08 +0200

Serge D. Mechveliani <address@hidden> wrote:

> Dear Axiom supporters,
> 2. I would also like to have the output of kind
> 
>  "  - (s-1) * (s+1) * (p^4 +(2*e^3 + (24*s^2 - 4)*e)*p^3 * ...) * ... 
>  "
> 
> For example, my DoCon program can read this format ...
> 
> 2.1 It prints these polynomials like for  (Z[e])[p]:  
>                                               " (e^2 + 2e)*p "
>     How to print it like for  Z[p,e]: 
>                                               " 2*p*e + e^2 "
>     ?
> 
> Thank you in advance for the help,
> 
> -----------------
> Serge Mechveliani
> address@hidden

Dear Serge,

You may wish to use the InputForm domain, where you can find some
bizarre functions. In your case, "unparse" may help you, as follows.

Best regards,

Daniel

~ $ axiom
                        AXIOM Computer Algebra System 
                Version of Tuesday May 25, 2004 at 17:08:19 
-----------------------------------------------------------------------------
   Issue )copyright to view copyright notices.
   Issue )summary for a summary of useful system commands.
   Issue )quit to leave AXIOM and return to shell.
-----------------------------------------------------------------------------
 
   Re-reading compress.daase   Re-reading interp.daase
   Re-reading operation.daase
   Re-reading category.daase
   Re-reading browse.daase
(1) -> p:=(a+b+y)^2*y+1-(x+y+z)^4
   Loading /local/augot/axiom/mnt/linux/algebra/UPMP.o for package 
      UnivariatePolynomialMultiplicationPackage 

   (1)
        4               3        2             2  2
     - z  + (- 4y - 4x)z  + (- 6y  - 12x y - 6x )z
   + 
          3        2      2      3      4              3        2            2
     (- 4y  - 12x y  - 12x y - 4x )z - y  + (- 4x + 1)y  + (- 6x  + 2b + 2a)y
   + 
          3    2           2      4
     (- 4x  + b  + 2a b + a )y - x  + 1
                                                     Type: Polynomial Integer
(2) -> pi:=p::InputForm
   Loading /local/augot/axiom/mnt/linux/algebra/INFORM.o for domain 
      InputForm 
   Loading /local/augot/axiom/mnt/linux/algebra/SEX.o for domain 
      SExpression 
   Loading /local/augot/axiom/mnt/linux/algebra/POLYLIFT.o for package 
      PolynomialCategoryLifting 
   Loading /local/augot/axiom/mnt/linux/algebra/DFLOAT.o for domain 
      DoubleFloat 
   Loading /local/augot/axiom/mnt/linux/algebra/SEXOF.o for domain 
      SExpressionOf 

   (2)
   (+

     (+

       (+  (+ (* - 1 (** z 4)) (* (+ (* - 4 y) (* - 4 x)) (** z 3)))
        (* (+ (+ (* - 6 (** y 2)) (* (* - 12 x) y)) (* - 6 (** x 2))) (** z 2)))


       (*

         (+

           (+  (+ (* - 4 (** y 3)) (* (* - 12 x) (** y 2)))
            (* (* - 12 (** x 2)) y))

          (* - 4 (** x 3)))

        z)
       )


     (+

       (+

         (+  (+ (* - 1 (** y 4)) (* (+ (* - 4 x) 1) (** y 3)))
          (* (+ (* - 6 (** x 2)) (+ (* 2 b) (* 2 a))) (** y 2)))

        (* (+ (* - 4 (** x 3)) (+ (+ (** b 2) (* (* 2 a) b)) (** a 2))) y))

      (+ (* - 1 (** x 4)) 1))
     )
                                                              Type: InputForm
(3) -> unparse(pi)
   Loading /local/augot/axiom/mnt/linux/algebra/FST.o for domain 
      FortranScalarType 
   Loading /local/augot/axiom/mnt/linux/algebra/FT.o for domain 
      FortranType 
   Loading /local/augot/axiom/mnt/linux/algebra/SYMS.o for domain 
      TheSymbolTable 
   Loading /local/augot/axiom/mnt/linux/algebra/SYMTAB.o for domain 
      SymbolTable 
   Loading /local/augot/axiom/mnt/linux/algebra/TABLE.o for domain 
      Table 
   Loading /local/augot/axiom/mnt/linux/algebra/HASHTBL.o for domain 
      HashTable 
   Loading /local/augot/axiom/mnt/linux/algebra/INTABL.o for domain 
      InnerTable 
   Loading /local/augot/axiom/mnt/linux/algebra/KDAGG-.o for domain 
      KeyedDictionary& 
   Loading /local/augot/axiom/mnt/linux/algebra/VOID.o for domain Void 

   (3)
  "(-z**4)+((-4*y)+(-4*x))*z**3+((-6*y*y)+(-12*x*y)+(-6*x*x))*z*z+((-4*y**3)+(-
  12*x*y*y)+(-12*x*x*y)+(-4*x**3))*z+(-y**4)+((-4*x)+1)*y**3+((-6*x*x)+2*b+2*a)
  *y*y+((-4*x**3)+b*b+2*a*b+a*a)*y+(-x**4)+1"
                                                                 Type: String

(4) -> )sh InputForm
 InputForm  is a domain constructor
 Abbreviation for InputForm is INFORM 
 This constructor is not exposed in this frame.
 Issue )edit /local/augot/axiom/mnt/linux/../../src/algebra/INFORM.spad to see 
algebra source code for INFORM 

------------------------------- Operations --------------------------------
 #? : % -> Integer                     ?*? : (%,%) -> %
 ?**? : (%,Integer) -> %               ?+? : (%,%) -> %
 ?/? : (%,%) -> %                      ?=? : (%,%) -> Boolean
 1 : () -> %                           0 : () -> %
 atom? : % -> Boolean                  binary : (%,List %) -> %
 car : % -> %                          cdr : % -> %
 coerce : % -> OutputForm              convert : SExpression -> %
 convert : % -> SExpression            convert : OutputForm -> %
 convert : DoubleFloat -> %            convert : Integer -> %
 convert : Symbol -> %                 convert : String -> %
 convert : List % -> %                 declare : List % -> Symbol
 destruct : % -> List %                ?.? : (%,List Integer) -> %
 ?.? : (%,Integer) -> %                eq : (%,%) -> Boolean
 expr : % -> OutputForm                flatten : % -> %
 float : % -> DoubleFloat              float? : % -> Boolean
 hash : % -> SingleInteger             integer : % -> Integer
 integer? : % -> Boolean               interpret : % -> Any
 lambda : (%,List Symbol) -> %         latex : % -> String
 list? : % -> Boolean                  null? : % -> Boolean
 pair? : % -> Boolean                  string : % -> String
 string? : % -> Boolean                symbol : % -> Symbol
 symbol? : % -> Boolean                unparse : % -> String
 ?~=? : (%,%) -> Boolean              
 ?**? : (%,NonNegativeInteger) -> %
 compile : (Symbol,List %) -> Symbol
 function : (%,List Symbol,Symbol) -> %





reply via email to

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