Popularity
7.6
Stable
Activity
0.1
-
27
2
7

Monthly Downloads: 81
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
Tags: Math    
Latest version: v1.2.1.5

modular-arithmetic alternatives and similar packages

Based on the "Math" category.
Alternatively, view modular-arithmetic alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of modular-arithmetic or a related project?

Add another 'Math' Package

README

Modular Arithmetic

Hackage package

This package provides a type for integers modulo some constant, usually written as ℤ/n.

Here is a quick example:

>>> 10 * 11 :: ℤ/7
5

It also works correctly with negative numeric literals:

>>> (-10) * 11 :: ℤ/7
2

Modular division is an inverse of modular multiplication. It is defined when divisor is coprime to modulus:

>>> 7 `div` 3 :: ℤ/16
13
>>> 3 * 13 :: ℤ/16
7