axiom-mail
[Top][All Lists]
Advanced

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

Re: [Axiom-mail] positive definite matrix predicate


From: Konstantin L. Metlov
Subject: Re: [Axiom-mail] positive definite matrix predicate
Date: Mon, 28 Dec 2009 23:03:05 +0200
User-agent: KMail/1.9.10

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.




reply via email to

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