[GiNaC-list] Symbolic functions with multiple outputs

Chris Dams C.Dams at science.ru.nl
Thu Sep 8 09:41:20 CEST 2005

Dear John,

On Thu, 2005-09-08 at 15:57 +1000, John Pye wrote:

> Is it possible to create symbolic functions that have multiple, matrix,
> or list outputs? Is there a way to assign the outputs of a
> multiple-valued symbolic function to elements of a list?

You could have a function that automatically evals into a list by
supplying the appropriate eval_func. However, is there anything wrong
with ex p=pressure_of_water(T,rho); and ex h=enthalpy_of_water(T,rho);?
In the list case, perhaps what you really would want to have is a
symbolic function water_variables(p,h) that does not evalutate further
but can be used to hold pressure and enthalpy as results.

Best wishes,

More information about the GiNaC-list mailing list