Previous Page Next Page Contents

Type::RatExpr -- type for testing rational expressions

Introduction

With Type::RatExpr, rational expressions can be identified.

Call(s)

testtype(obj, Type::RatExpr(indet <, coeff_type>))

Parameters

obj - any MuPAD object
indet - an indeterminante
coeff_type - a type for the coefficientes; a type can be an object of the library Type or one of the possible return values of domtype and type

Returns

see testtype

Related Functions

testtype, indets

Details

Example 1

A polynomial expression in x is also a rational expression in x:

>> testtype(-x^2 - x + 3, Type::RatExpr(x))
                                   TRUE

testtype is used to select all rational operands in x with positive integer coefficients:

>> EX := sin(x) + x^2 - 3*x + 2 + 3/x:
   select(EX, testtype, Type::RatExpr(x, Type::PosInt))
                                3    2
                                - + x  + 2
                                x
>> delete EX:

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000