Quantcast
Channel: `Missing = inserted for \ifnum` when using addplot - TeX - LaTeX Stack Exchange
Viewing all articles
Browse latest Browse all 4

Answer by Cryptc for `Missing = inserted for \ifnum` when using addplot

$
0
0

Using a related answer about fpu formatting, I was able to use \ifnum in the case that my result was within the range of an int() [−16383.9998, +16383.9998]. The trick is to use \pgfmathfloattofixed on the \pgfmathresult.

\pgfkeys{/pgf/fpu=true}\pgfmathparse{...do floating point math here (with an int() result)...}\pgfmathfloattofixed{\pgfmathresult} % this allows the conversion with int()\edef\tmp{\pgfmathresult}\pgfkeys{/pgf/fpu=false}\pgfmathsetmacro\iTmp{int(\tmp)} % convert with int()\ifnum \iTmp>0  ... do stuff ...\fi

Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>