Re: positive definite matrix predicate
Martin Rubey <[email protected]> Tue, 29 Dec 2009 09:38:00 +0100
| Newsgroups | gmane.comp.mathematics.axiom.user |
|---|---|
| Message-ID | <[email protected]> |
"Konstantin L. Metlov" <[email protected]> writes: > (1) -> sqrt(-1.0) > 1) -> > >> Error detected within library code: > negative sqrt > 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 ? The interpreter uses a heuristic to choose which operation "sqrt" to use roughly based on it's - name (here: sqrt) - argument types (here: Float, Integer, Integer) - expected return type (here: none given, none given, Complex Float) (The details are in i-funsel.boot, which unfortunately is quite underdocumented, in my opinion.) You can watch the choices the interpreter makes by typing )set message bottom on (or simply )se me bo on) hope this helps, Martin