hp40g+.book Page 52 Friday, December 9, 2005 1:03 AM

DIVMOD

Division in Z/pZ or Z/pZ[X].

 

Example 1

 

In Z/pZ, the arguments are two integers: A and B. When

 

B has an inverse in Z/pZ, the result is A/B simplified as

 

Z/pZ.

 

Typing:

 

DIVMOD(5, 3)

 

gives:

 

6

 

Example 2

 

In Z/pZ[X], the arguments are two polynomials: A[X] and

 

B[X]. The result is a rational fraction A[X]/B[X] simplified

 

as Z/pZ[X].

 

Typing:

 

DIVMOD(2X2 + 5, 5X2 + 2X –3)

 

gives:

 

4x + 5

 

–--------------

 

3x + 3

EXPANDMOD

Expand and simplify expressions in Z/pZ or Z/pZ[X].

 

Example 1

 

In Z/pZ, the argument is an integer expression.

 

Typing:

 

EXPANDMOD(2 · 3 + 5 · 4)

 

gives:

 

0

 

Example 2

 

In Z/pZ[X], the argument is a polynomial.

 

Typing:

 

EXPANDMOD((2X2 + 12)·(5X – 4))

 

gives:

 

–(3x3 – 5 ⋅ x2 + 5 ⋅ x – 4)

14-52

 

 

Computer Algebra System (CAS)