Skip to contents

It is just a wrapper function to call modlin. This function is intended to be use internally. MLE (\(a * x = b mod n\)) not always has solution If the MLE has not solution the function will return the value -1. Also, if \(a * x = b mod n\) has solution x = 0, then function 'modeq' will return -1.

Usage

modeq(a, b, n)

Value

A number. If the equation has not solution in their definition, domain it will return -1.

Examples

## The MLE 10 * x = 3 mod 64 has not solution
modeq(10, 3, 64)
#> [1] -1

## The result is the giving calling modlin(10, 4, 64)
modeq(10, 4, 64)
#> [1] 26