Possible Duplicate:
How can I automatically calculate sums in a LaTeX table?
Can LaTeX do simple math?
I have a table with two columns and want to automatically add a third column which contains the difference between the two first:
+------+------+-------+
| M1 | M2 | M2-M1 |
+------+------+-------+
| 80.1 | 95.2 | +15.1 |
+ ... | ... | ... |
I could write a Perl script that generates the third column but it would also be nice if LaTeX could do that directly ...