modeq: A Wrapper Calling Modular Linear Equation Solver (MLE)

View source: R/modeq.R

modeqR Documentation

A Wrapper Calling Modular Linear Equation Solver (MLE)

Description

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)

## The result is the giving calling modlin(10, 4, 64)
modeq(10, 4, 64)

genomaths/GenomAutomorphism documentation built on Dec. 12, 2024, 2:12 p.m.