## `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

- In MuPAD, arithmetical objects are objects for which arithmetical operations such as addition, multiplication, exponentiation etc. are defined. These include numbers, most expressions, `infinity` and elements of certain library domains. In particular, the latter include `rectform` objects and series expansions of domain type `Series::Puiseux`.
- The following objects are not regarded as arithmetical objects:
  - equations and inequalities,
  - Boolean objects and Boolean expressions involving `and`, `or`, `not`,
  - lists,
  - sets and set expressions involving `union`, `intersect`, `minus`,
  - polynomials of domain type `DOM_POLY`,
  - functions and procedures,
  - arrays and tables.
- This type does not represent a property: it cannot be used in `assume` to mark an identifier as an arithmetical object.

#### 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

- new function

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000