CST or 10 SF).
Otherwise, polynomial arithmetic is assumed. This is important for
instructions like GCD3 or ABCUV.
DIV2: euclidean division. Stack 2 is the quotient, stack
1 the remainder.
GCD1:
'X^2+2*X+1' 'X^2+3*X+2' GCD1 returns 'X+1'
25 15 GCD1 returns 5
1.
LCM1: lowest common multiple
(GCD1
LCM1
'X^2+2*X+1' 'X^2+3*X+2' LCM1 returns '(X^2+2*X+1)*(X+2)'
25 15 LCM1 returns 75
GCD3: extended gcd algorithm, given x and y returns d ,
u and v s.t.:
ABCUV: (Bezout identity)
'X^2+2*X+1' 'X^2+3*X+2' 'X+1' -> -1 1 1 'X^2+2*X+1' 'X^2+3*X+2' 1 -> 0This means for the first case that:
LGCD: returns the gcd of a list of objects.
SIMP2: simplifies two objects by dividing them by their GCD.
Sets flags 12, 14 and 15. Ex: stk2: 9, stk1: 6 SIMP2 -> stk2: 3, stk1: 2
DIVIS: gives a list of divisors of an object. Example:
21 -> { 1 7 3 21 }
fact and comb: like the built-in FACT and
COMB instructions but for long integers.
EULER: Euler indicatrix
PA2B2 (kernel library):
XFRC: Q but handles quadratic
irrationals (recognize a quadratic irrational if its expansion in continued
fraction is ultimately periodic of period less or equal to 3)
Examples:
ORND:
ORND returns .5+.2*x.