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

IREMAINDER works with integers and with Gaussian integers. This is what distinguishes it from MOD.

 

Example 2

 

Typing:

 

IREMAINDER(2 + 3·i, 1 + i)

 

gives:

 

i

ISPRIME?

Returns a value indicating whether an integer is a prime

 

number. ISPRIME?(n) returns 1 (TRUE) if n is a prime or

 

pseudo-prime, and 0 (FALSE) if n is not prime.

 

Definition: For numbers less than 1014, pseudo-prime

 

and prime mean the same thing. For numbers greater

 

than 1014, a pseudo-prime is a number with a large

 

probability of being prime.

 

Example 1

 

Typing:

 

ISPRIME?(13)

 

gives:

 

1.

 

Example 2

 

Typing:

 

ISPRIME?(14)

 

gives:

 

0.

LCM

Returns the least common multiple of two integers.

 

Example

 

Typing:

 

LCM(18, 15)

 

gives:

 

90

MOD

See “MOD” on page 13-15.

14-50

 

 

Computer Algebra System (CAS)