Hello William, and thanks a lot

> > resFloat   : Expression Float := cos (4.0 * x)
> > resInteger : Expression Float := cos (4 * x)
> > resComplex : Expression Complex Integer := exp (3+4*%i)
> > 
> > How can I get Float from resFloat ? Integer from resInteger, etc.
> > in a *.input file ?
 
> Is the following what you want?

No I don't try to get the sub-argument, but the type of the subargument.
But I'm not sure I can get it.
 
> (isTimes ((argument ((kernels resFloat).1)).1)).1::Float
> (isTimes ((argument ((kernels resInteger).1)).1)).1::Integer
> argument ((kernels resComplex).1).1::Complex Integer

Imagine I know that a is an Expression...
My function don't know if a is an Expression Float, or an Expression Integer...

I want to do as below in an *.input file.

Myfunction (a : Expression ...) : String ==
  is a an Expression Integer => "Integer"             -- or an other calculus.
  is a an Expression Franction Integer => "Rationnal" 
  is a an Expression Complex ... => "Complex"   -- so I can use real and imag.
  is a an Expression Float => "Float"
  "A rare domain".

Thanks a lot.

Francois 


_______________________________________________
Axiom-math mailing list
Axiom-math@nongnu.org
http://lists.nongnu.org/mailman/listinfo/axiom-math

Reply via email to