mattcanderson1

Mr. Matthew Anderson

35 Reputation

6 Badges

15 years, 94 days

MaplePrimes Activity


These are answers submitted by mattcanderson1

Synthetic division is possible in Maple using the quo and rem commands.

Here is a demonstration.

> num := 3*x^2+2*x+1;
> den := x+1;
> quotient := quo(num, den, x);
3 x - 1
> remainder := rem(num, den, x);
2
> check := (3*x-1)*(x+1)+2;
> expand(check);
2
3 x + 2 x + 1
I hope this helps.
Matt Anderson

GANESH, here is my understanding of Maple isprime()

The isprime() function will first check if the input is a prime less than 100.
then it checks if it is divisible by a prime less than 100,
then it checks if it is divisible by a prime less than 1000,
(it uses the product of the primes < 1000 for this step)
then it uses one Rabin-Miller test, and one Lucas test.

use the maple command showstat(isprime) to see the code.

An old iteration of the code is available here:
http://www.math.utsa.edu/ftp/gokhman/mirrors/maple/maplev/mplarchv/libs/isprime.txt

Regards,

Matt Anderson

1 2 Page 2 of 2