4

Here is the sample format of non-integers number

12.5+13.8=26.3
Mico
  • 506,678
Biki Teron
  • 3,275

1 Answers1

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

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

\end{document}

enter image description here

  • 1
    ! LaTeX Error: File `xfp.sty' not found. @Herbert – Biki Teron Apr 29 '17 at 07:06
  • Also, curious: what does it say for \fpeval{0.1+0.2}? – ShreevatsaR Apr 29 '17 at 07:20
  • @BikiTeron: install it. xfp is part of l3packages: http://ctan.org/pkg/xfp –  Apr 29 '17 at 07:22
  • @ShreevatsaR: feel free to test it ... ;-) –  Apr 29 '17 at 07:23
  • @Herbert Unfortunately, I wasn't able to install it. I got xfp.{dtx,ins} but then I got Package xfpu Error: Support package l3kernel too old. Gave up at this point. Nevermind, just idle curiosity about floating-point. Will find out some day when I upgrade my TeX distribution :-) – ShreevatsaR Apr 29 '17 at 07:25
  • 1
    @ShreevatsaR: you have to update the three "package bundles" l3kernel, l3experimental and l3packages or simply update these ones if they are already installed. –  Apr 29 '17 at 07:32
  • command to install new packages in texlive, open your terminal window as root and type as shown "tlmgr install xfp" without quotes @ShreevatsaR – Biki Teron Apr 29 '17 at 07:59