% This file is embedded in datatool-user.pdf version 3.4.2 2025-11-06
% Example 3 Performing Calculations with LaTeX3
% Label: "ex:l3fptodec"
% arara: pdflatex
% arara: pdfcrop
\documentclass[12pt]{article}
\pagestyle{empty}
 \ExplSyntaxOn
\newcommand{\myfunc} [3]
{
 \fp_to_decimal:n{ #1 + 0.5 * sqrt(#2) / (#3) }
}
\ExplSyntaxOff
\newcommand{\numA}{1023.5}
\newcommand{\numB}{54.75000}
\newcommand{\numC}{-20648.68} 
\begin{document}
 $ \numA+\frac{\sqrt{\numB}}{2\times\numC} = \myfunc{\numA}{\numB}{\numC} $ 
\end{document}
