Next: , Previous: Algebraic Commands, Up: Algebra


2.3 Rational Expression

— Command: num expr

The function num takes a rational expression as input and returns a numerator of the expression.

          e25 : num((x^2+y^2)/(x^2-y^2));
          
                  2    2
          e25: - x  - y
          
          e26 : num(7/4);
          
          e26: 7
          
          e27 : num(7/(4/3));
          
          e27: 21
— Operator: denom rational-expression

The Jacal command denom is used to obtain the denominator of a rational expression.

          e26 : denom(4/5);
          
          e26: 5
— Command: listofvars expr

The command listofvars takes as input a rational expression and returns a list of the variables that occur in that expression.

          e7 : listofvars(x^2+y^3);
          
          e7: [x, y]
          
          e8 : listofvars((x^2+y^3)/(2*x^7+y*x+z));
          
          e8: [z, x, y]
— Command: imagpart z

Returns the coefficient of %i in expression z;

— Command: realpart z

Returns all but the coefficient of %i in expression z;

— Command: abs z
— Command: cabs z

| z |

Returns the square root of the sum of the squares of the realpart and the imagpart of z.