axiom-developer
[Top][All Lists]
Advanced

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

[Axiom-developer] I can't test if %i exists or not.


From: Francois Maltey
Subject: [Axiom-developer] I can't test if %i exists or not.
Date: 08 Apr 2006 18:19:39 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

hello,

I'm trying to improve TRMANIP in manip.spad.

I want to know if the expressions have the Complex notion or not.

In this package I can add the function :

    ifComplex : F -> Boolean
    ifComplex (arg) ==
      (R is Complex Integer) or (R is Complex Fraction Integer) _
        or (R is Fraction Complex Integer)

the arg has no use, but with this arg I can test the function ifComplex
in the interpreter for a given expression.

I re^10-read previous mails about the qestion, 
and the wiki page SandBoxManipulatingDomains, but...

1/ I can't find a better function than ifComplex for the test 
<< %i exists in Expression >>. 
Even if theses cases are the more current, they aren't all the cases.

2/ I can neither get %i (or imaginary()$R) in F, nor get 
imag(expr) in a *.spad file although it's possible in interpreter 
thanks to the file efstruc.spad (?).

In manip.spad my testing function is

testing : F -> F
testing arg == ...

I can't compile :
testing arg == 
   dom(arg)=devaluate(Expression Complex Integer)$Lisp => 999::R::F
   arg

the test is always false 
testing arg == 
   F has ComplexCategory R => imaginary()::F
   arg

it's right for Complex Integer
testing arg == 
  R is Complex Integer => 987::Integer::R::F
  arg

but then I can't hold the << %i >> number.

testing arg == 
  R is Complex Integer => (imaginary()$Complex Integer)::F 
  arg

When I run I get 
>> System error:
   Caught fatal error [memory may be damaged]

May you give me one of the keys ? I ignore where I shall look ?
Is there any link with SExpressions...

Thanks a lot.

François




reply via email to

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