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: Martin Rubey
Subject: Re: [Axiom-mail] positive definite matrix predicate
Date: Tue, 29 Dec 2009 09:38:00 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux)

"Konstantin L. Metlov" <address@hidden> 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




reply via email to

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