4-40 Computer Algebra Commands
2≡
1≡
Result: SIN(X)*(X)+COS(X)
See also: INTVX, INT, PREVAL, RISCH
ICHINREM
Type: Command
Description: Solves a system of two congruences in integers using the Chinese Remainder theorem.
Access: Arithmetic, !ÞINTEGER
Input: Level 2/Argument 1: A vector of the first value and the modulus.
Level 1/Argument 2: A vector of the second value and the modulus.
Output: A vector of the solution.
Flags: Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag -3 clear).
Radians mode must be set (flag –17 set).
Example: Solve the following system of congruences:
Modulo 3
Modulo 5
Command:
ICHINREM([2,3],[1,5])
Results: [-4, 15]
See also: CHINREM
IDIV2
Type: Command
Description: For two integers, a and b, returns the integer part of a/b, and the remainder, r.
Access: Arithmetic, !ÞINTEGER
Input: Level 2/Argument 1: a.
Level 1/Argument 2: b.
Output: Level 2/Item 1: The integer part of a/b.
Level 1/Item 2: The remainder.
Flags: Numeric mode must not be set (flag -3 clear).
Radians mode must be set (flag –17 set).
Example: Return the integer part and the remainder of 11632/864.
Command:
IDIV2(11632,864)
Result: {13,400}
See also: DIV2, IQUOT
IEGCD
Type: Command
Description: Given two integers x and y, returns three integers, a, b, and c, such that:
ax+by=c
where c is the GCD of x and y.
Access: P
ARITH or Arithmetic, !ÞINTEGER
Input: Level 2/Argument 1: x.
Level 1/Argument 2: y.
Output: Level 3/Item 1: c.
Level 2/Item 2: a.