On 8/3/05, Mario wrote:
> (%i33) f(x,a,b):=listify(setify(exp(flatten(args(transpose(a).x^b)))))$
Agreed, this works. However, it works because exp distributes
over lists, and many other functions (e.g., sin, cos) do not.
Somewhat more generally, then --
outermap (lambda ([a, b], exp (a * x^b)), coeff, power) =>
[[%e^-1, %e^-x, %e^-x^2], [1, 1, 1], [%e, %e^x, %e^x^2]]
and then listify (setify (flatten (%))) yields the list you are expecting.
Hmm, a moment's thought suggests
map (exp, flatten (args (transpose (a) . x^b)))
which also works.
Hope this helps,
Robert Dodier