|
From: | Tim Daly |
Subject: | Re: [Axiom-mail] positive definite matrix predicate |
Date: | Mon, 28 Dec 2009 17:52:53 -0500 |
User-agent: | Thunderbird 2.0.0.21 (Windows/20090302) |
Konstantin L. Metlov wrote:
Yes, but the Integer domain does not include complex unity either and in that case the result is automatically converted to AlgebraicNumber, which can represent it. Analogous behaviour in the first case could be to declare the result of sqrt on Float as Complex(Float).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.Konstantin _______________________________________________ Axiom-mail mailing list address@hidden http://lists.nongnu.org/mailman/listinfo/axiom-mail
It could be argued either way. Using floats is generally done because you want a numeric answer. A %i answer would by symbolic. I'd be willing to accept either form but, at the moment, Axiom does not do the coercion for floats automatically. You can get the behavior you want by an explicit call (the so-called dollar call which specifies which domain to choose): sqrt(-1.0)$Complex(Float) ==> %i Tim
[Prev in Thread] | Current Thread | [Next in Thread] |