Previous Page Next Page Contents

Type::Arithmetical -- a type representing arithmetical objects

Introduction

Type::Arithmetical represents arithmetical objects.

Call(s)

testtype(obj, Type::Arithmetical)

Parameters

obj - any MuPAD object

Returns

see testtype

Related Functions

testtype

Details

Example 1

Numbers and expressions are regarded as arithmetical objects:

>> testtype(3 + I, Type::Arithmetical),
   testtype(x + sqrt(2) + I*PI, Type::Arithmetical),
   testtype(x/y + y/x, Type::Arithmetical)
                             TRUE, TRUE, TRUE

Equations and inequalities are not regarded as arithmetical objects:

>> testtype(x^2 = 2, Type::Arithmetical),
   testtype(x <> 2, Type::Arithmetical),
   testtype(x < 2, Type::Arithmetical),
   testtype(x >= 2, Type::Arithmetical)
                        FALSE, FALSE, FALSE, FALSE

Sets, lists, tables and arrays are not arithmetical:

>> testtype({a, b, c}, Type::Arithmetical),
   testtype(array(1..1, [x]), Type::Arithmetical)
                               FALSE, FALSE

However, domain objects such as matrices of some matrix domain are arithmetical:

>> testtype(Dom::Matrix()([[1, 2], [3, 4]]), Type::Arithmetical)
                                   TRUE

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000