## `Type::Numeric` -- a type for testing numerical objects

#### Introduction

With `Type::Numeric`, numeric objects (numbers) can be identified.

#### Call(s)

`testtype(obj,` Type::Numeric)

#### Parameters

`obj` | - | any MuPAD object

#### Returns

see `testtype`

#### Related Functions

`assume`, `is`, `testtype`, `Type::Complex`

#### Details

- The call `testtype(obj,` Type::Numeric) checks, whether `obj` is a number and returns `TRUE`, if it holds, otherwise `FALSE`.
- A number has the domain type `DOM_INT`, `DOM_RAT`, `DOM_FLOAT` or `DOM_COMPLEX`.
- This type does not represent a property.

#### Example 1

The following objects are numbers.

    >> testtype(2, Type::Numeric),
       testtype(3/4, Type::Numeric),
       testtype(0.123, Type::Numeric),
       testtype(1 + I/3, Type::Numeric),
       testtype(1.0 + 2.0*I, Type::Numeric)

                           TRUE, TRUE, TRUE, TRUE, TRUE

The following objects are not numerical objects.

    >> testtype(ln(2), Type::Numeric),
       testtype(sin(3/4), Type::Numeric),
       testtype(x + I/3, Type::Numeric)

                                FALSE, FALSE, FALSE

#### Changes

- no changes

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