# How to sum two non-integer numbers in LaTeX? [duplicate]

Here is the sample format of non-integers number

12.5+13.8=26.3

• With LuaLaTeX: \directlua{tex.sprint(12.5+13.8)}. – Mico Apr 29 '17 at 7:15

\documentclass{article}
\usepackage{xfp}
\begin{document}

$12.5+13.8 = \fpeval{12.5+13.8}$

\end{document}


• ! LaTeX Error: File xfp.sty' not found. @Herbert – Biki Teron Apr 29 '17 at 7:06
• Also, curious: what does it say for \fpeval{0.1+0.2}? – ShreevatsaR Apr 29 '17 at 7:20
• @BikiTeron: install it. xfp is part of l3packages: ctan.org/pkg/xfp – user2478 Apr 29 '17 at 7:22
• @ShreevatsaR: feel free to test it ... ;-) – user2478 Apr 29 '17 at 7:23
• @ShreevatsaR: you have to update the three "package bundles" l3kernel, l3experimental and l3packages` or simply update these ones if they are already installed. – user2478 Apr 29 '17 at 7:32