Polynomial long division: Difference between revisions
Content added Content deleted
Walterpachl (talk | contribs) (added REXX) |
m (→{{header|REXX}}: corrected a misspelling.) |
||
Line 1,708: | Line 1,708: | ||
zx=z |
zx=z |
||
nx=n copies('0 ',words(z)-words(n)) |
nx=n copies('0 ',words(z)-words(n)) |
||
qx='' /* |
qx='' /* Quotient */ |
||
Do Until words(zx)<words(n) |
Do Until words(zx)<words(n) |
||
Parse Value div(zx,nx) With q zx |
Parse Value div(zx,nx) With q zx |
||
Line 1,749: | Line 1,749: | ||
{{out}} |
{{out}} |
||
<pre>(x**3-12*x**2-42)/(x-3)=(x**2-9*x-27) |
<pre>(x**3-12*x**2-42)/(x-3)=(x**2-9*x-27) |
||
Remainder: -123 </pre> |
Remainder: -123 </pre> |
||
=={{header|Ruby}}== |
=={{header|Ruby}}== |