[Tex/LaTex] Calculations on variables using LaTeX

calculations

I'm trying to do some basic calculations using values stored on a command, but it doesn't do the calculation:

\newcommand{\lenghtHeatExchanger}{0.820}
\newcommand{\heightHeatExchanger}{1.081}
\newcommand{\areaHeatExchanger}{\lenghtHeatExchanger*\heightHeatExchanger}

Is there a simple way to do that using LaTeX ?

Thank you.

Best Answer

I will suggest to use the calculator package and its \MULTIPLY command, see documentation here. BUT: I think that if you could switch to LuaLaTeX it would surely be the best solution!

Related Question