# Using \polyremainder in polynom package

The documentation of the polynom package refers in chapter "4.6 Low-level commands" (p. 6) to a command called \polyremainder, which should display only the remainder of a polynomial division. I'm not quite sure how to use it, but even calling the command yields the following error: Undefined control sequence. \polyremainder

\polyadd\polya{x^4}{0}
\polyremainder


and

\polyadd\polya{x^4}{0}
\polyremainder\polya\polyb


The local copy of polynom is the most recent version on CTAN (2006/04/20 0.17 (CH,HA)).

Using TeX Live 2015 on Windows 7 SP1 64 bit

• don't you need to divide, instead of adding to get a remainder? According to the definition of the package, \polyremainder is only set if \polydiv is given first. – Runar Jun 25 '16 at 16:42
• @RunarTrollet Thanks, calling \polydiv first solves the issue. Actually, I've missed that the \polyremainder line in the documentation isn't meant to be on its own. If you write your comment as an answer, I'll gladly accept it. – user2009388 Jun 25 '16 at 18:30

To get the remainder you need to do a division first, and in polynom you need to do \polydiv before \polyremainder.

Output

Code

\documentclass[11pt]{article}
\usepackage{polynom}
\begin{document}
$\polylongdiv\polya\polyb$