Re: eval function

Martin Rubey <[email protected]> 17 Mar 2009 22:25:14 +0100
Newsgroups gmane.comp.mathematics.axiom.user
Message-ID <[email protected]>
(1) -> f:=-(37/84)*x^2 -(7/12)*x -1/42

          37  2    7      1
   (1)  - -- x  - -- x - --
          84      12     42
                                          Type: Polynomial(Fraction(Integer))
(2) -> x12:=radicalSolve(f,x)

               +----+          +----+
            - \|2105  - 49    \|2105  - 49
   (2)  [x= --------------,x= ------------]
                  74               74
                                    Type: List(Equation(Expression(Integer)))
(3) -> g:=12*x^3 + 5*x^2 + 11*x + 16

           3     2
   (3)  12x  + 5x  + 11x + 16
                                                    Type: Polynomial(Integer)
(4) -> eval(f,x12.1)

   (4)  0
                                                    Type: Expression(Integer)
(5) -> eval(g,x12.1)

                +----+
        - 16959\|2105  + 9279
   (5)  ---------------------
                50653
                                                    Type: Expression(Integer)

Just note that x12.1 is an equation, fit for eval...

Martin