# Dom::Integer

Ring of integer numbers

### Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

## Syntax

```Dom::Integer(`x`)
```

## Description

`Dom::Integer` is the ring of integer numbers represented by elements of the domain `DOM_INT`.

Elements of `Dom::Integer` are usually not created explicitly. However, if one creates elements using the usual syntax, it is checked whether the input is an integer number. This means that `Dom::Integer` is a façade domain which creates elements of domain type `DOM_INT`.

Viewed as a differential ring `Dom::Integer` is trivial, it contains constants only.

`Dom::Integer` has the domain `Dom::Numerical` as its super domain, i.e., it inherits each method which is defined by `Dom::Numerical` and not re-implemented by `Dom::Integer`. Methods described below are those implemented by `Dom::Integer`.

## Superdomain

`Dom::Numerical`

## Examples

### Example 1

Creating some integer numbers using `Dom::Integer`. This example also shows that `Dom::Integer` is a façade domain.

`Dom::Integer(2); domtype(%)`

`Dom::Integer(2/3)`
```Error: The arguments are invalid. [Dom::Integer::new] ```

### Example 2

By tracing the method `Dom::Integer::testtypeDom` we can see the interaction between `testtype` and `Dom::Integer::testtypeDom`.

```prog::trace(Dom::Integer::testtypeDom): delete x: testtype(x, Dom::Integer); testtype(3, Dom::Integer); prog::untrace(Dom::Integer::testtypeDom):```
```enter Dom::Integer::testtypeDom(x, Dom::Integer) computed FALSE ```

``` enter Dom::Integer::testtypeDom(3, Dom::Integer) computed TRUE ```

## Parameters

 `x` An integer

collapse all

## Mathematical Methods

### `associates` — Associate elements

`associates(x, y)`

### `_divide` — Division of two objects

`_divide(x, y)`

### `_divides` — Decide if a number divides another one

`_divides(x, y)`

### `euclideanDegree` — Euclidean degree

`euclideanDegree(x)`

### `factor` — Factorization

`factor(x)`

### `gcd` — Gcd computation

`gcd(x1, x2, …)`

### `gcdex` — Applie the extended Euclidean algorithm

`gcdex(x, y)`

### `_invert` — Inverse of an element

`_invert(x)`

### `irreducible` — Prime number test

`irreducible(x)`

### `isUnit` — Test if an element is a unit

`isUnit(x)`

### `lcm` — Compute the lcm

`lcm(x1, x2, …)`

### `quo` — Compute the euclidean quotient

`quo(x, y)`

### `random` — Random number generation

`random()`

`random(n)`

`random(m .. n)`

This methods returns a random number between 0 and n - 1.

This methods returns a random number between `m` and `n`.

### `rem` — Compute the Euclidean reminder

`rem(x, y)`

### `unitNormal` — Unit normal part

`unitNormal(x)`

### `unitNormalRep` — Unit normal representation

`unitNormalRep(x)`

## Conversion Methods

### `convert` — Conversion of objects

`convert(x)`

### `convert_to` — Conversion to other domains

`convert_to(x, T)`

The following domains are allowed for `T`: `DOM_INT`, `Dom::Integer`, `Dom::Rational`, `DOM_FLOAT`, `Dom::Float` and `Dom::Numerical`.

### `testtype` — Type checking

`testtype(x, T)`

Usually, this method is called from the function `testtype` and not directly by the user. Example 2 demonstrates this behavior.