Anonymous user
Polynomial long division: Difference between revisions
→{{header|zkl}}: the rest of the bug fix
(→{{header|zkl}}: bug fix) |
(→{{header|zkl}}: the rest of the bug fix) |
||
Line 1,947:
str:=[0..].zipWith('wrap(n,a){ if(a) "+ %sx^%s ".fmt(a,n) else "" },terms)
.sink(String).walk()
.replace("x^0
.replace("+ -", "- ");
if(not str) return(" "); // all zeros
|