Modular menu – HP 40gs User Manual

Page 233

Advertising
background image

Computer Algebra System (CAS)

14-51

NEXTPRIME

NEXTPRIME(n) returns the smallest prime or pseudo-prime
greater than n.

Example

Typing:

NEXTPRIME(75)

gives:

79

PREVPRIME

PREVPRIME(n) returns the greatest prime or pseudo-prime
less than n.

Example

Typing:

PREVPRIME(75)

gives:

73

Modular menu

All the examples of this section assume that p =13; that
is, you have entered MODSTO(13) or
STORE(13,MODULO), or have specified 13 for

Modulo

in CAS

MODES screen (as explained on page 15-16).

ADDTMOD

Performs an addition in Z/pZ.

Example 1

Typing:

ADDTMOD(2, 18)

gives:

–6

ADDTMOD can also perform addition in Z/pZ[X].

Example 2

Typing:

ADDTMOD(11X + 5, 8X + 6)

gives:

6x 2

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

Advertising
This manual is related to the following products: