Karim Belabas on Tue, 14 Jan 2014 14:58:00 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: new FFM_mul (and FlxqM_mul, FqM_mul, ...) |
* Bill Allombert [2014-01-14 14:35]: > 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 :) Agreed. Call that a typo :-) K.B. -- Karim Belabas, IMB (UMR 5251) Tel: (+33) (0)5 40 00 26 17 Universite Bordeaux 1 Fax: (+33) (0)5 40 00 69 50 351, cours de la Liberation http://www.math.u-bordeaux1.fr/~kbelabas/ F-33405 Talence (France) http://pari.math.u-bordeaux1.fr/ [PARI/GP] `