SNAP
Quotient
compute the quotient of polynomial division
Remainder
compute the remainder of polynomial division
Calling Sequence
Parameters
Description
Examples
Quotient(a, b, x, 'r')
Remainder(a, b, x, 'q')
a, b
-
univariate numeric polynomials in x
x
name; indeterminate for a and b
'r', 'q'
(optional) unevaluated names; assigned remainder and quotient, respectively
The Quotient command returns the numeric quotient of a divided by b.
The Remainder command returns the numeric remainder of a divided by b.
The numeric remainder r and numeric quotient q satisfy: −b⁢q+a−r is small with degree⁡r,x<degree⁡b,x. Here, small means O⁡10−Digits.
If a fourth argument is included in the calling sequence for Quotient or Remainder, it is assigned the remainder r or quotient q, respectively.
with⁡SNAP:
a≔−85⁢x17−55⁢x9−37⁢x7−35⁢x2+97⁢x+50:
b≔79⁢x5+56⁢x4+49⁢x3+63⁢x2+57⁢x−59:
r≔Remainder⁡a,b,x,q
r≔50.0020132327863⁢x4−19.3198166346744⁢x3−322.237747865981⁢x2+300.078717373004⁢x+20.0352085974540
q
−1.07594936708861⁢x12+0.762698285531166⁢x11+0.126714113893627⁢x10+0.295146883006482⁢x9−0.119722722703336⁢x8−1.55310796081941⁢x7+1.41800886004233⁢x6−0.0646951159943631⁢x5+0.0154956351481713⁢x4−0.0704903789877349⁢x3−2.55944186458305⁢x2+2.95135053578343⁢x−0.507877820382136
q≔Quotient⁡a,b,x
q≔−1.07594936708861⁢x12+0.762698285531166⁢x11+0.126714113893627⁢x10+0.295146883006482⁢x9−0.119722722703336⁢x8−1.55310796081941⁢x7+1.41800886004233⁢x6−0.0646951159943631⁢x5+0.0154956351481713⁢x4−0.0704903789877349⁢x3−2.55944186458305⁢x2+2.95135053578343⁢x−0.507877820382136
expand⁡a−b⁢q−r
−1.42108547152020×10−14⁢x12+1.42108547152020×10−14⁢x11−9.76996261670138×10−15⁢x10+3.99680288865056×10−14⁢x8−1.13686837721616×10−13⁢x6−7.81597009336110×10−14⁢x16−5.68434188608080×10−14⁢x15−2.13162820728030×10−14⁢x14+1.77635683940025×10−15⁢x13−1.35003119794419×10−13⁢x5−1.42108547152020×10−14⁢x17+2.84217094304040×10−14⁢x7+5.68434188608080×10−14⁢x9+2.84217094304040×10−14⁢x
See Also
expand
Quo
quo
Rem
rem
Download Help Document