synthetic division
#{:
(,,3,22,color(white)("X")15,color(white)("X")6,color(white)("XX")8),
(,,,12,136,604,2440),
(,,"----","----","----","----","----"),
(xx(+4),"|",color(blue)(3),color(blue)(34),color(blue)(151),color(blue)(610),color(red)(2448))
:}#
polynomial long division
#{:
(,,3x^3,+34x^2,+15x,+610,),
(,,"----","-------","-------","-------","-------"),
(x-4,")",3x^4,+22x^3,+15x^2,6x,+8),
(,,3x^4,-12x^3,,,),
(,,"----","-------",,,),
(,,,34x^3,+15x^2,,),
(,,,34x^3,-136x^2,,),
(,,,"-------","-------",,),
(,,,,151x^2,+6x,),
(,,,,151x^2,-604x,),
(,,,,"-------","-------",),
(,,,,,610x,+8),
(,,,,,610x,-2440),
(,,,,,"-------","-------"),
(,,,,,,2448)
:}#