Previous Page Next Page Contents

numer -- the numerator of a rational expression

Introduction

numer(f) returns the numerator of the expression f.

Call(s)

numer(f)

Parameters

f - an arithmetical expression

Returns

an arithmetical expression.

Overloadable:

f

Related Functions

denom, factor, gcd, normal

Details

Example 1

We compute the numerators of some expressions:

>> numer(-3/4)
                                    -3
>> numer(x + 1/(2/3*x -2/x))
                                   3
                                2 x  - 3 x
>> numer((cos(x)^2 -1)/(cos(x) -1))
                                      2
                                cos(x)  - 1

Example 2

numer performs no cancellations if the rational expression is of the form ``numerator/denominator'':

>> r := (x^2 - 1)/(x^3 - x^2 + x - 1): numer(r)
                                   2
                                  x  - 1

This numerator has a common factor with the denominator of r; normal enforces cancellation of common factors:

>> numer(normal(r))
                                   x + 1

However, automatic normalization occurs if the input expression is a sum:

>> numer(r + x/(x + 1) + 1/(x + 1) - 1)
                                   x + 1
>> delete r:

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000