tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
|
|
@ -0,0 +1,19 @@
|
|||
> p := randpoly( x ); # pick a random polynomial in x
|
||||
5 4 3 2
|
||||
p := -56 - 7 x + 22 x - 55 x - 94 x + 87 x
|
||||
|
||||
> rem( p, x^2 + 2, x, 'q' ); # remainder
|
||||
220 + 169 x
|
||||
|
||||
> q; # quotient
|
||||
3 2
|
||||
-7 x + 22 x - 41 x - 138
|
||||
|
||||
> quo( p, x^2 + 2, x, 'r' ); # quotient
|
||||
3 2
|
||||
-7 x + 22 x - 41 x - 138
|
||||
|
||||
> r; # remainder
|
||||
220 + 169 x
|
||||
> expand( (x^2+2)*q + r - p ); # check
|
||||
0
|
||||
Loading…
Add table
Add a link
Reference in a new issue