I think I found an answer within Axiom itself:

(1) -> sqrt(-1.0)
 1) ->
   >> Error detected within library code:
   negative sqrt

This is, probably, what I should do. It was really a question of how to fail: 
at type conversion or during the computation itself. This example shows that 
in the case of Float Axiom fails during the computation. My computation will 
involve floats and is similar to this example. This way to fail is simple and 
makes it unnecessary to define categories. I should, probably, simply add 
predicates to SquareMatrixCategory to test for hermitiannes (symmetricity, if 
its real) and positive definiteness to avoid duplicate code in future.

On the other hand:

(1) -> sqrt(-1)
(1) ->
         +---+
   (1)  \|- 1
                                                        Type: AlgebraicNumber

(2) -> sqrt(-1)::Complex(Float)
(2) ->
   (2)  %i
                                                          Type: Complex Float

Shouldn't it be consistent with the former ?

With the best regards,
                           Konstantin.


_______________________________________________
Axiom-mail mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/axiom-mail

Reply via email to