Re: Can I decompose a domain ?

Francois Maltey <[email protected]>
Newsgroups gmane.comp.mathematics.axiom.general
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.