focus expression text field at startup -> version 1.2
[LeanCalc.git] / help / frem
1 NAME
2     frem - remove specified integer factors from specified integer
3
4 SYNOPSIS
5     frem(x,y)
6
7 TYPES
8     x           integer
9     y           integer
10
11     return      non-negative integer
12
13 DESCRIPTION
14     If x and y are not zero and n is the largest non-negative integer
15     for which y^n is a divisor of x, frem(x,y) returns abs(x/y^n).
16     In particular, abs(x) is returned if x is not divisible by
17     y or if abs(y) = 1.  If abs(y) > 1, frem(x,y) is the greatest
18     divisor of x not divisible by y.
19
20     For all x, frem(x,0) is defined to equal abs(x).
21
22     For all y, frem(0,y) is defined to be zero.
23
24     For all x and y, abs(x) = frem(x,y) * abs(y) ^ fcnt(x,y).
25
26 EXAMPLE
27     > print frem(7,4), frem(24,4), frem(48,4), frem(-48,4)
28     7 6 3 3
29
30 LIMITS
31     none
32
33 LINK LIBRARY
34     NUMBER *qfacrem(NUMBER *x, NUMBER *y);
35
36 SEE ALSO
37     fcnt, gcdrem
38