I am looking for a method to do minimal floating point / integer calculations in LaTeX, not for the purpose of package writing, but for the production of actual text.
Here is an example to illustrate. Given the following input text
The experiment included running a battery of \bind{T}{21} tests
on \bind{S}{13} subjects, for a total of \bind{V}{T*S} expected values.
However, since \bind{F}{37} values were defective, our successful
measurement rate per subject was \use{100*round((V-F)/T,2)}\%
it would be nice if was converted to:
The experiment included running a battery of $21$ tests
on $13$ subjects, for a total of $273$ expected values.
However, since $37$ values were defective, our successful
measurement rate per subject was $86$\%.
Where \bind{C}{expression} defines a new constant C whose value is expression, and returns C, while \use{C} simply returns the value of C. Any tips?
I am aware of the spreadtab package and this question: this question, but I am looking for something more.
