pgf-tikz / pgfplots

pgfplots - A TeX package to draw normal and/or logarithmic plots directly in TeX in two and three dimensions with a user-friendly interface and pgfplotstable - a TeX package to round and format numerical tables. Examples in manuals and/or on web site.
http://pgfplots.sourceforge.net/
200 stars 35 forks source link

[fpu] bug in pgfplotsoldpgfsupp_pgflibraryfpu.code.tex #169

Closed pgf-tikz-bot closed 4 years ago

pgf-tikz-bot commented 7 years ago

Migrated from SourceForge https://sourceforge.net/p/pgfplots/bugs/169/ Author: u_fischer Timestamp: 2017-05-05 13:38:08.375000

The definition of \pgfmathfloat@install@unimplemented is faulty. There is a @ too much after \csname pgfmath, and this means that the original definition is not restored when one deactivates the fpu library.

The same problem is in the original fpu library of pgf.

\documentclass{article}
\usepackage{pgfplots}
    \pgfplotsset{compat=1.14}
\begin{document}
    \begin{tikzpicture}
        \pgfkeys{/pgf/fpu=false}
        \pgfmathparse{Mod(2,4)}
    \end{tikzpicture}
\end{document}

gives

! Package PGF Math Error: Sorry, the operation 'Mod' has not yet been implement
ed in the floating point unit (in 'Mod(2,4)').

Changing the definition to

\def\pgfmathfloat@install@unimplemented#1{%
    \expandafter\pgfmathfloat@prepareuninstallcmd\csname pgfmath#1@\endcsname%
    \expandafter\def\csname pgfmath#1@\endcsname##1{\pgfmathfloat@notimplemented{#1}}%
}

solved the problem.

See also this TeX.SX question: https://tex.stackexchange.com/a/368281/2388

pgf-tikz-bot commented 7 years ago

Migrated from SourceForge https://sourceforge.net/p/pgfplots/bugs/169/#591f Author: cfeuersaenger Timestamp: 2017-05-06 20:08:17.956000

Thanks for the report - I was unaware of the fact that the backwards compatibility layer increases the severity of that issue.

I will push the next release of pgfplots; it will come with the fix.

pgf-tikz-bot commented 7 years ago

Migrated from SourceForge https://sourceforge.net/p/pgfplots/bugs/169/#6c29 Author: mo-gul Timestamp: 2017-05-25 05:45:07.164000

For the record: It seems that commit https://sourceforge.net/p/pgfplots/code/ci/de13162129bfe3bd6703a6af08a7313447e2f8c0/ already has fixed the problem without touching the lines mentioned by Ulrike. Nonetheless, are these faulty, too?

(I line mentioned by Ulrike is in tex\generic\pgfplots\oldpgfcompatib\pgfplotsoldpgfsupp_pgflibraryfpu.code.tex line 194. I found the same in tex\generic\pgfplots\oldpgfcompatib\pgfplotsoldpgfsupp_loader.code.tex for \def\pgfmathfloat@install@unimplemented@broken#1{% in line 183.)

pgf-tikz-bot commented 7 years ago

Migrated from SourceForge https://sourceforge.net/p/pgfplots/bugs/169/#1caa Author: cfeuersaenger Timestamp: 2017-06-02 15:22:41.267000

pgf-tikz-bot commented 7 years ago

Migrated from SourceForge https://sourceforge.net/p/pgfplots/bugs/169/#7b54 Author: cfeuersaenger Timestamp: 2017-06-02 15:22:41.490000

I verified that this is a duplicate and has already been addressed by the fix.

It will become part of the next stable release