Previous Page Next Page Contents

Type::PosRat -- a type and a property representing positive rational numbers

Introduction

Type::PosRat represents positive rational numbers. Type::PosRat is a property, too, which can be used in an assume call.

Call(s)

testtype(obj, Type::PosRat)
assume(x, Type::PosRat)
is(ex, Type::PosRat)

Parameters

obj - any MuPAD object
x - an identifier or one of the expressions Re(u) or Im(u) with an identifier u
ex - an arithmetical expression

Returns

see testtype, assume and is

Related Functions

testtype, is, assume, Type::Property

Details

Example 1

The following numbers are of type Type::PosRat:

>> testtype(2, Type::PosRat),
   testtype(3/4, Type::PosRat),
   testtype(55/111, Type::PosRat),
   testtype(1, Type::PosRat),
   testtype(111/111111, Type::PosRat)
                       TRUE, TRUE, TRUE, TRUE, TRUE

Example 2

Assume an identifier is positive rational:

>> assume(x, Type::PosRat):
   is(x, Type::PosRat)
                                   TRUE

Also positive rational numbers are rational:

>> assume(x, Type::PosRat):
   is(x, Type::Rational)
                                   TRUE

However, rational numbers can be positive rational or not:

>> assume(x, Type::Rational):
   is(x, Type::PosRat)
                                  UNKNOWN
>> delete x:

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000