Skip to contents

It is just a wrapper function to call modlin. This function is intended to be used internally. The MLE (\(a * x = b \ mod \ n\)) does not always have a solution. If the MLE has no 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 no solution in its domain of definition, it will return -1.

Examples

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

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