I have a macro
\mywonderfulmacro{...}
that expects an ordinary floating point number in lieu of .... (For example,
\mywonderfulmacro{4.51}
is valid.) Now I would like to do something like this:
\def\a{1.2}
\def\b{1.3}
\mywondefulmacro{\a * \b}
The hope would of course be that the above code results in
\mywonderfulmacro{1.56}
being evaluated. Unfortunately, TeX doesn't work this way and I get an error!
What is the correct/easiest way to do this?
PS: I know the answer is surely implicit in previous questions/answers to this forum, given sufficient discernment, but my know-how is very low so please I please need an answer that addresses this specific question in this specific situation, not a pointer to some technical post with \the \numexpr and whatnot :/
TeX... or is LaTeX also possible?\the\numexpr\a*\bwouldn't work for floating point content anyway – Feb 09 '18 at 00:00