Dear Francois,
I'd propose
)abbrev package TEST Test
Test(): Exports == Implementation where
EXPR ==> Expression Integer
CEXPR ==> Complex EXPR
Exports == with
fct: (Integer, EXPR) -> EXPR
Implementation == add
fct(n, x) ==
vc := 'c::Symbol::EXPR
vs := 's::Symbol::EXPR
ve: EXPR := real((complex(vc,0)$CEXPR + complex(0,vs)$CEXPR)**n)
eval(ve, [vs, vc], [sin(x)$EXPR, cos(x)$EXPR])
This will work for any FunctionSpace, since they all have
RetractableTo(Symbol).
Note that vc := 'c::EXPR would not work, although it would compile...
Martin
_______________________________________________
Axiom-developer mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/axiom-developer