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: −bq+a−r is small with degreer,x<degreeb,x. Here, small means O10−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.
withSNAP:
a≔−85x17−55x9−37x7−35x2+97x+50:
b≔79x5+56x4+49x3+63x2+57x−59:
r≔Remaindera,b,x,q
r≔50.0020132327865x4−19.3198166346741x3−322.237747865981x2+300.078717373004x+20.0352085974539
q
−1.07594936708861x12+0.762698285531165x11+0.126714113893627x10+0.295146883006482x9−0.119722722703335x8−1.55310796081941x7+1.41800886004233x6−0.0646951159943633x5+0.0154956351481729x4−0.0704903789877340x3−2.55944186458305x2+2.95135053578343x−0.507877820382137
q≔Quotienta,b,x
q≔−1.07594936708861x12+0.762698285531165x11+0.126714113893627x10+0.295146883006482x9−0.119722722703335x8−1.55310796081941x7+1.41800886004233x6−0.0646951159943633x5+0.0154956351481729x4−0.0704903789877340x3−2.55944186458305x2+2.95135053578343x−0.507877820382137
expanda−bq−r
−5.68434188608080×10−14x12−5.06261699229071×10−14x10+2.66453525910038×10−15x8−1.42108547152020×10−13x6−9.94759830064140×10−14x5−5.68434188608080×10−14x7−2.84217094304040×10−14x9−4.26325641456060×10−14x17−5.68434188608080×10−14x16−5.32907051820075×10−15x15−3.55271367880050×10−14x14−6.03961325396085×10−14x13
See Also
expand
Quo
quo
Rem
rem
Download Help Document