Initial revision
[LeanCalc.git] / help / mmin
1 NAME
2     mmin - least-absolute-value residues modulo a specified number
3
4 SYNOPSIS
5     mmin(x, md)
6
7 TYPES
8     x           number (real or complex), matrix, list, object
9     md          real
10
11     return      real
12
13 DESCRIPTION
14     If x is real and md is nonzero, mmin(x, md) returns the real
15     number v congruent to x modulo md for which abs(v) <= md/2
16     and if abs(v) = md/2, then v = md/2.
17
18     If x is real and md is zero, mmin(x, md) returns x.
19
20     For complex, matrix, list or object x, see the help file for mod: for
21     all x and md, mmin(x, md) returns the same as mod(x, md, 16).
22
23 EXAMPLE
24     > print mmin(3,6), mmin(4,6), mmin(5,6), mmin(6,6), mmin(7,6)
25     3 -2 -1 0 1
26
27     > print mmin(1.25, 2.5), mmin(-1.25,2.5), mmin(1.25, -2.5)
28     1.25 1.25 -1.25
29
30 LIMITS
31     none
32
33 LINK LIBRARY
34     none
35
36 SEE ALSO
37     mod
38