> For the complete documentation index, see [llms.txt](https://trizen.gitbook.io/perl6-rosettacode/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://trizen.gitbook.io/perl6-rosettacode/programming_tasks/m/modular_arithmetic.md).

# Modular arithmetic

We'll use the [FiniteFields](https://raku.land/github:grondilu/finite-fields-raku) repo.

```perl
use FiniteField;
$*modulus = 13;

sub f(\x) { x**100 + x + 1};

say f(10);
```

#### Output:

```
1
```
