Bill Allombert on Tue, 14 Jan 2014 14:35:20 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: new FFM_mul (and FlxqM_mul, FqM_mul, ...)


On Tue, Jan 14, 2014 at 12:32:39PM +0100, Karim Belabas wrote:
> * Bill Allombert [2014-01-14 11:48]:
> > Do you know how to compute the square of a matrix faster than by using M*M ?
> 
> Obviously for matrices of size 1, we do :-)
> 
> For size 2 as well (2 squares + 4 multiply) :
> 
> (12:15) gp > [a,b;c,d]^2
> %1 = 
> [a^2 + c*b b*a + d*b]
> 
> [c*a + d*c c*b + d^2]
> 
> =
> 
> [a^2 + c*b b*(a + d)]
> 
> [c*(a + d) c*b + d^2]

This is only 2 squares and 3 multiply :)

Cheers,
Bill.