Accelerating the pace of engineering and science

# Documentation Center

• Trial Software
• Product Updates

# Type::NegInt

Type and property representing negative integers

### Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

## Syntax

```testtype(obj, Type::NegInt)
assume(x, Type::NegInt)
is(ex, Type::NegInt)
```

## Description

Type::NegInt represents negative integers. Type::NegInt is a property, too, which can be used in an assume call.

The call testtype(obj, Type::NegInt) checks, whether obj is a negative integer number and returns TRUE, if it holds, otherwise FALSE.

testtype only performs a syntactical test identifying MuPAD® objects of type DOM_INT and checks, if bool(obj < 0) holds.

The call assume(x, Type::NegInt) marks the identifier x as a negative integer number.

The call is(ex, Type::NegInt) derives, whether the expression ex is a negative integer number (or this property can be derived).

This type represents a property that can be used in assume and is.

## Examples

### Example 1

The following numbers are of type Type::NegInt:

```testtype(-2, Type::NegInt),
testtype(-3, Type::NegInt),
testtype(-55, Type::NegInt),
testtype(-1, Type::NegInt),
testtype(-111111111, Type::NegInt)```

### Example 2

Assume an identifier is a negative integer:

```assume(x, Type::NegInt):
is(x, Type::NegInt)```

Negative integers are integers, of course:

```assume(x, Type::NegInt):
is(x, Type::Integer)```

However, integers can be negative or not:

```assume(x, Type::Integer):
is(x, Type::NegInt)```

`delete x:`

## Parameters

 obj Any MuPAD object x An identifier or a mathematical expression containing identifiers ex

## Return Values

See testtype, assume and is

## See Also

### MuPAD Functions

Was this topic helpful?