hp40g+.book Page 51 Friday, December 9, 2005 1:03 AM
NEXTPRIME | NEXTPRIME(n) returns the smallest prime or |
| greater than n. |
| Example |
| Typing: |
| NEXTPRIME(75) |
| gives: |
| 79 |
PREVPRIME | PREVPRIME(n) returns the greatest prime or |
| less than n. |
| Example |
| Typing: |
| PREVPRIME(75) |
| gives: |
| 73 |
| 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 |
ADDTMOD | Performs an addition in Z/pZ. |
| Example 1 |
| Typing: |
| ADDTMOD(2, 18) |
| gives: |
| |
| ADDTMOD can also perform addition in Z/pZ[X]. |
| Example 2 |
| Typing: |
| ADDTMOD(11X + 5, 8X + 6) |
| gives: |
| 6x – 2 |
Computer Algebra System (CAS) |
| ||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|