I would like to use polynomial macro, just with the standard way.
But the coefficients of the polynom are generated by \FPeval or \pgfmathrandominteger commands => the result of polynomial isn't the expected one ...
\begin{document}
\pgfmathrandominteger{\VRcoeffa}{-5}{-1}
\pgfmathrandominteger{\VRcoeffb}{-5}{-1}
\pgfmathrandominteger{\VRcoeffc}{-5}{-1}
\pgfmathrandominteger{\VRcoeffd}{-5}{-1}
$f(x)=\polynomial[reciprocal]{\VRcoeffa,\VRcoeffb,\VRcoeffc,\VRcoeffd}$\par
\FPeval\VRcoeffa{(0-1)} \FPclip\VRcoeffa{\VRcoeffa}
\FPeval\VRcoeffb{(0-3)} \FPclip\VRcoeffb{\VRcoeffb}
\FPeval\VRcoeffc{(0)} \FPclip\VRcoeffc{\VRcoeffc}
\FPeval\VRcoeffd{(0-12)} \FPclip\VRcoeffd{\VRcoeffd}
\FPeval\VRcoeffe{(1)} \FPclip\VRcoeffe{\VRcoeffe}
\FPeval\VRcoefff{(0-1)} \FPclip\VRcoefff{\VRcoefff}
$f(x)=\polynomial[reciprocal]{%
\VRcoeffa,%
\VRcoeffb,%
\VRcoeffc,%
\VRcoeffd,%
\VRcoeffe,%
\VRcoefff%
}$
\par
$\polynomial[reciprocal]{-1,-3,0,-12,1,-1}$
\end{document}
I suspect a managment of type of variable I've no idea about with LaTeX (I'm not very used to LaTeX ... but I'm trying ;o). Thanks in advance for your help !
**** EDIT ****
This is unrelated to pgfmath. Looks like an expansion issue. Here's a MWE.
\documentclass{article}
\usepackage{polynomial}
\begin{document}
\newcommand{\vl}{-3}
$\polynomial[reciprocal]{1,\vl}$
\end{document}
This produces
instead of $x-3$



articleis fine) and the necessary packages? And what exactly are you asking? – Torbjørn T. Feb 15 '17 at 14:31\vlis not expanded before the check of-. I will dig into the code. – StefanH Feb 15 '17 at 15:49