axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] I can't translate from the interpreter to the comp


From: Martin Rubey
Subject: Re: [Axiom-developer] I can't translate from the interpreter to the compiler
Date: 28 Mar 2006 14:22:15 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]