4

Here is the sample format of non-integers number

12.5+13.8=26.3
1
  • With LuaLaTeX: \directlua{tex.sprint(12.5+13.8)}. – Mico Apr 29 '17 at 7:15
5
\documentclass{article}
\usepackage{xfp}
\begin{document}

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

\end{document}

enter image description here

7
  • 1
    ! 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
  • 1
    @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

Not the answer you're looking for? Browse other questions tagged or ask your own question.