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.0020132327863x4−19.3198166346744x3−322.237747865981x2+300.078717373004x+20.0352085974540
q
−1.07594936708861x12+0.762698285531166x11+0.126714113893627x10+0.295146883006482x9−0.119722722703336x8−1.55310796081941x7+1.41800886004233x6−0.0646951159943631x5+0.0154956351481713x4−0.0704903789877349x3−2.55944186458305x2+2.95135053578343x−0.507877820382136
q≔Quotienta,b,x
q≔−1.07594936708861x12+0.762698285531166x11+0.126714113893627x10+0.295146883006482x9−0.119722722703336x8−1.55310796081941x7+1.41800886004233x6−0.0646951159943631x5+0.0154956351481713x4−0.0704903789877349x3−2.55944186458305x2+2.95135053578343x−0.507877820382136
expanda−bq−r
−1.42108547152020×10−14x12+1.42108547152020×10−14x11−9.76996261670138×10−15x10+3.99680288865056×10−14x8−1.13686837721616×10−13x6−7.81597009336110×10−14x16−5.68434188608080×10−14x15−2.13162820728030×10−14x14+1.77635683940025×10−15x13−1.35003119794419×10−13x5−1.42108547152020×10−14x17+2.84217094304040×10−14x7+5.68434188608080×10−14x9+2.84217094304040×10−14x
See Also
expand
Quo
quo
Rem
rem
Download Help Document