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.0020132327866⁢x4−19.3198166346740⁢x3−322.237747865981⁢x2+300.078717373004⁢x+20.0352085974538
q
−1.07594936708861⁢x12+0.762698285531166⁢x11+0.126714113893626⁢x10+0.295146883006483⁢x9−0.119722722703335⁢x8−1.55310796081941⁢x7+1.41800886004233⁢x6−0.0646951159943645⁢x5+0.0154956351481735⁢x4−0.0704903789877334⁢x3−2.55944186458305⁢x2+2.95135053578343⁢x−0.507877820382139
q≔Quotient⁡a,b,x
q≔−1.07594936708861⁢x12+0.762698285531166⁢x11+0.126714113893626⁢x10+0.295146883006483⁢x9−0.119722722703335⁢x8−1.55310796081941⁢x7+1.41800886004233⁢x6−0.0646951159943645⁢x5+0.0154956351481735⁢x4−0.0704903789877334⁢x3−2.55944186458305⁢x2+2.95135053578343⁢x−0.507877820382139
expand⁡a−b⁢q−r
−8.52651282912120×10−14⁢x12+4.26325641456060×10−14⁢x11+4.17443857259059×10−14⁢x10+1.24344978758018×10−14⁢x8−1.42108547152020×10−13⁢x6−7.81597009336110×10−14⁢x5+2.84217094304040×10−14⁢x7+6.39488462184090×10−14⁢x9−1.42108547152020×10−14⁢x17−7.10542735760100×10−14⁢x16−3.55271367880050×10−15⁢x15−7.46069872548105×10−14⁢x14−8.34887714518118×10−14⁢x13−2.84217094304040×10−14⁢x
See Also
expand
Quo
quo
Rem
rem
Download Help Document
What kind of issue would you like to report? (Optional)