One thing I would like to do in many instances is arrange input/output in columns for comparison. I expect that I need to use Grid
to do this, but have not been able to figure out the right commands. For example, if I have the following type of function and two different possibilities:
Table[GCD[fun1[c^a], fun1[c^b]], {a, 1, 3}, {b, 1, 3}, {c, 1, 3}]
Table[GCD[fun2[c^a], fun2[c^b]], {a, 1, 3}, {b, 1, 3}, {c, 1, 3}]
Here, I have two custom functions fun1
and fun2
which take multiple inputs over ranges (27 possibilities in all). I want the output to be rearranged so I have the following columns:
a, b, c, GCD[fun1[c^a], fun1[c^b]], GCD[fun2[c^a], fun1[c^b]], difference
In otherwords I want to see the combination of inputs being used in the leftmost columns, the ouptuts from the two possible expressions, one using fun1, the other using fun2, then optionally a final column showing the difference between the two possible outputs for each of the 27 possibilities.
How can I do this?