Hi Peter,

On Wednesday, 22 January 2014 16:53:43 UTC, Peter Bruin wrote:
>
> Is the default choice of the algorithm the right one?
>> One can see that 
>> sage: A.determinant(algorithm="hessenberg")
>> 16801.7979988558
>> is quite good...  
>>
>
> The PARI documentation of the function charpoly() says: "If flag=2, uses 
> the Hessenberg form. Assumes that the base ring is a field.  Uses $O(n^3)$ 
> scalar operations, but suffers from coefficient explosion unless the base 
> field is finite or $\R$."  Since the determinant is just the constant term 
> of the characteristic polynomial, this looks safe for the determinant as 
> well.
>

Sage computes det() by computing charpoly(0), too... The division-free 
algorithm is obviously meant for more general setting of rings, not fields. 
I don't know why it was made default here, perhaps just an oversight.
 

>
> I guess the question whether we should use Sage's built-in Hessenberg 
> algorithm or PARI's matdet() comes down to which of the two is faster.
>

for charpoly(), that is.
 

>
> Peter
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to