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: Tim Daly
Subject: Re: [Axiom-mail] positive definite matrix predicate
Date: Mon, 28 Dec 2009 17:17:01 -0500
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

Konstantin L. Metlov wrote:
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
address@hidden
http://lists.nongnu.org/mailman/listinfo/axiom-mail

It is consistent with the former. The domain Float does not include the
result %i so it is an error. The other domains include the result.

Tim





reply via email to

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