\documentclass{article}
\usepackage{xfp}
\def\ctod#1{\xctod#1,\relax{}}
\def\xctod#1,#2\relax#3{\ifx\\#2\\\expandafter\xxctod\else\expandafter\xctod\fi.#2\relax{#3#1}}
\def\xxctod#1\relax{\fpeval}
\def\dtoc#1{\expandafter\xdtoc\romannumeral`\^^@#1.\empty}
\def\xdtoc#1.#2{#1\ifx\empty#2\else,\expandafter\xdtoc\romannumeral`\^^@\fi#2}
\begin{document}
\fpeval{123.45 + 77.5}
\ctod{123,45 + 77,5}
\dtoc{\ctod{123,45 + 77,5}}
% expansion
\typeout{\fpeval{123.45 + 77.5}}
\typeout{\ctod{123,45 + 77,5}}