# Documentation

### Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

## Syntax

```numlib::isquadres(`a`, `m`)
```

## Description

If the integer number `a` is a quadratic residue modulo the natural number `m``numlib::isquadres(a,m)` returns `TRUE`, and if `a` is a quadratic non-residue modulo `m``numlib::isquadres(a,m)` returns `FALSE`.

If `a` and `m` are not coprime `numlib::isquadres(a,m)` returns an error.

`numlib::isquadres` returns an error if the arguments evaluate to numbers which are not both of the correct type.

`numlib::isquadres` returns the function call with its arguments evaluated if the arguments do not evaluate to numbers.

## Examples

### Example 1

132132 is a quadratic residue modulo 3231227:

`numlib::isquadres(132132, 3231227)`

### Example 2

222222 is a quadratic non-residue modulo 324899:

`numlib::isquadres(222222,324899)`

### Example 3

37 is a quadratic residue modulo 48884:

`numlib::isquadres(37,48884)`

## Parameters

 `a` An integer `m` A natural number coprime to `a`

## Return Values

`numlib::isquadres` returns `TRUE`, `FALSE`, or the function call with its arguments evaluated.