Skip to content

\pgfmathparse calls every function *twice* #2482

@xworld21

Description

@xworld21

Tweak any PGF function to have a side effect, for example edit pgfmath.code.tex.ltxml as follows:

    e          => sub { NoteSTDERR('evaluating `e`'); $E; },

Then run the innocuous

\pgfmathparse{e}\pgfmathresult

LaTeXML will print 'evaluating e' twice!

Aside from the performance impact, which is probably negligible, this is making it impossible to replicate PGF's random number generator because rand gets called twice every time.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions