When I tried to compile:
\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[very thin, red] (0,0) circle (2);
\foreach \i in {0, 1, 2, ..., 46} \draw[very thin, red] ({360 * \i / 100}:1) circle (1);
\end{tikzpicture}
\end{document}
I got:
! Dimension too large.
<recently read> \pgfmath@x
l.6 ...thin, red] ({360 * \i / 100}:1) circle (1);
I can't work with sizes bigger than about 19 feet.
Continue and I'll use the largest value I can.
And if I turn 46
to 45
, say \foreach \i in {0, 1, 2, ..., 45}
, that code will pass the compiling.
It seems that some value I was trying to calculate is larger than the TeX engine can handle.
After searching TeX.SX for about half an hour, I got this, this and this. These questions have been solved, however, the origin and structure of the problem still remain unclear. Hence, I decide to raise this question: what is the limit (its origin and formation), and how can I avoid it.
Any clues would be appreciated.
-16384 < x < 16384
. It doesn't matter if the result of the entire calculation is in this range. If the range is exceeded at any point there will be an error. In this case you can reorder the calculation:(\i/100*360:1)
.({360 * \i / 100}:1)
with({ \i / 100 * 360}:1)