Previous Page Next Page Contents

polylib::makerat -- convert expression into rational function over a suitable field

Introduction

polylib::makerat(a) returns two polynomials f and g over some extension field of the rationals and a list of substitutions such that applying the substitutions to the rational function (f)/(g) gives a.

polylib::makerat(l) does the same for every element of a list l of expressions such that the same extension field is chosen for all elements of the list.

Call(s)

polylib::makerat(a)
polylib::makerat(l)

Parameters

a - polynomial over Expr or arithmetical expression
l - list or set of polynomials over Expr or arithmetical expressions

Returns

polylib::makerat returns an expression sequence consisting of three operands:



Related Functions

rationalize

Example 1

In the simplest case (integer polynomial), the numerator equals the input, the denominator equals 1, and no substitutions are necessary:

>> polylib::makerat(x^2+3)
                          2
                    poly(x  + 3, [x]), poly(1, [x]), []

Example 2

Floating point numbers are considered transcendental:

>> polylib::makerat(0.27*x)
            poly(x D1, [x, D1]), poly(1, [x, D1]), [D1 = 0.27]

Example 3

Radicals are replaced by elements of algebraic extensions:

>> polylib::makerat(sqrt(2)/x)
      poly(D2, [x], Dom::AlgebraicExtension(Dom::Rational,
      
           2
         D2  - 2 = 0, D2)), poly(x, [x],
      
                                                  2
         Dom::AlgebraicExtension(Dom::Rational, D2  - 2 = 0, D2)),
      
                1/2
         [D2 = 2   ]

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000