Directory macros/latex/contrib/pgfmath-xfp
# pgfmath-xfp – define pgfmath functions using xfp
Version 2021-05-19 v1.0
Released under the LaTeX Project Public License v1.3c or later See http://www.latex-project.org/lppl.txt
Hosted at https://github.com/Skillmon/ltxpgfmath-xfp
Copyright (C) 2021 Jonathan P. Spratte
This work may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), either version 1.3c of this license or (at your option) any later version. The latest version of this license is in the file:
http://www.latex-project.org/lppl.txt
This work is "maintained" (as per LPPL maintenance status) by Jonathan P. Spratte.
This provides a wrapper that allows to define pgfmath
functions using the expl3
FPU (which's LaTeX2ε document-level package is called xfp
) for the calculations. Each input argument is parsed by pgfmath
to normalize it to a form that xfp
understands.
Download the contents of this package in one zip archive (254.5k).
pgfmath-xfp – Define pgfmath functions using xfp
This package allows to define pgfmath functions that use the xfp fpu for their calculations.
The input arguments are parsed with pgfmath (while the pgf-fpu is locally active), and the results are forwarded to xfp’s fpu for the function evaluation. The result of that calculation is then parsed by pgfmath again (with the surrounding settings of pgfmath). This way the functions should be usable in every pgfmath context, though there is some overhead to this approach.
The package is only meant as a temporary stopgap until a more dedicated solution is available to use xfp in pgf.
Package | pgfmath-xfp |
Repository | https://github.com/Skillmon/ltx_pgfmath-xfp |
Version | 1.0 2021-05-19 |
Licenses | The LaTeX Project Public License 1.3c |
Copyright | 2020–2021 Jonathan P. Spratte |
Maintainer | Jonathan P. Spratte |
Contained in | TeX Live as pgfmath-xfp MiKTeX as pgfmath-xfp |
Topics | Experimental LaTeX3 Calculation |