Previous Page Next Page Contents

icontent -- the content of a polynomial with rational coefficients

Introduction

icontent(p) computes the content of the polynomial p with integer or rational number coefficients, i.e., the gcd of its coefficients.

Call(s)

icontent(p)

Parameters

p - a polynomial or polynomial expression with integer or rational number coefficients

Returns

a nonnegative integer or rational number, or FAIL

Related Functions

coeff, content, factor, gcd, ifactor, igcd, ilcm, lcm, poly, polylib::primpart

Details

Example 1

The first argument can be a polynomial or a polynomial expression. The following two calls of icontent are equivalent:

>> p := 6*x*y - 9*y^2 + 21:
   icontent(poly(p)), icontent(p)
                                   3, 3

The result of icontent is always nonnegative:

>> icontent(2*x - 4), icontent(-2*x + 4)
                                   2, 2

The content of a constant polynomial is its absolute value:

>> icontent(0), icontent(-2), icontent(poly(-2, [x]))
                                  0, 2, 2

Example 2

The content of a polynomial with rational coefficients is a rational number in general:

>> q := 6/7*x*y - 9/4*y + 12:
   icontent(poly(q)), icontent(q)
                                3/28, 3/28

The polynomial divided by its content has integral coefficients whose greatest common divisor is 1:

>> q/icontent(q)
                            8 x y - 21 y + 112
>> icontent(%)
                                     1

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000