Here is my previous thread.
I want to make the same calculations with number with decimal separator. Summing 2, 3 numbers or more.
This is my current code. I want to make 57208 - 57,208; 6207 - 6,207 and more..
\documentclass{article}
\newcommand{\showsum}[2][c]{%
$\edef\originalplusmathcode{\the\mathcode`+}%
\begingroup\lccode`~=`+ \lowercase{\endgroup\def~}{\\&}%
\mathcode`+ "8000
\begin{array}[#1]{@{}r@{\;}r@{}}
\mathchar\originalplusmathcode& #2 \\
\hline
& \the\numexpr#2\relax
\end{array}%
$%
}
\begin{document}
X\quad % to show the baseline
\showsum[b]{57208+6207+12095}\quad
X
\end{document}
What I need. Also with 2 numbers only.
\showsum[b]{57,208+6,207+12,095}\quad

EDIT: May question was wrong formulated. I want to sum numbers like that: 6.7+13.12+2.501=22.321 (with comma, not with dot in visualizing). And enter it in function in the same way.

\fpeval(instead of\intevalas in my example). If you addoutput-decimal-marker={,}to the setting of\sisetup, you'll get a,in the output. – Werner Dec 24 '18 at 16:23\showsub[.]{X-Y-Z-...}? Or are you ultimately interested in something more generic:\showsum[.]{X-Y+Z+A-B-C+D...}? – Werner Dec 26 '18 at 07:16