hp40g+.book Page 48 Friday, December 9, 2005 1:03 AM
IDIV2
In
18 mod 15 = 3
15 mod 3 = 0
Result: 3
Pressing or then causes 3 to be written to the Equation Writer.
Note that the last
Returns the quotient and the remainder of the Euclidean division between two integers.
Example
Typing:
IDIV2(148, 5)
gives:
29 AND 3
In
IEGCD
Returns the value of Bézout’s Identity for two integers. For example, IEGCD(A,B) returns U AND V = D, with U, V, D such that AU+BV=D and D=GCD(A,B).
Example
Typing:
IEGCD(48, 30)
gives
2 AND
In other words: 2·48 +
In
[z,u,v]:z=u*48+v*30
|
| Computer Algebra System (CAS) | |||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|