pgfmathparse does not correctly parse zero left-padded integers?

Extract from pgf manual (section 89.1.1 "Commands", p.923, pgfmanual v3.0.1a): "An integer with a zero-prefix (excluding, of course zero itself), is interpreted as an octal number and is automatically converted to base 10."

So, with pgfmath, you can't use decimal numbers with zero-prefix!


The LaTeX3 FPU can be used here and doesn't need the intermediate value step

\documentclass{standalone}
\usepackage{pgfplots}
\usepackage{expl3}
\ExplSyntaxOn
\cs_new_eq:NN \fpeval \fp_eval:n
\ExplSyntaxOff
\pgfplotsset{compat=1.13}

\begin{document}
  \begin{tikzpicture}
    \draw (0, 0) node {\fpeval{059/100}};
  \end{tikzpicture}
\end{document}

A solution is to forcefully interpret the number as a base 10 number. The following code makes use of \pgfmathdectobase to achieve this:

\documentclass{standalone}
\usepackage{pgfplots}

\pgfplotsset{compat=1.13}

\begin{document}
   \begin{tikzpicture}
      \pgfmathdectobase\mynumber{055}{10}
      \draw (0, 0) node {\pgfmathparse{\mynumber/100}\pgfmathresult};
   \end{tikzpicture}
\end{document}

For more information, see section 71.2.7 of the pgf manual, "Base conversion functions".