| Bill Allombert on Sun, 08 Oct 2023 12:30:40 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: efficient foursquare() and/or threesquare1m4() functions |
On Sun, Oct 08, 2023 at 12:01:16PM +0200, hermann@stamm-wilbrandt.de wrote: > On 2023-10-08 10:19, Bill Allombert wrote: > > On Sun, Oct 08, 2023 at 01:25:07AM +0200, hermann@stamm-wilbrandt.de > > wrote: > > > Because I already implemented generation of ternary quadratic form Q > > > for n > > > - that represents n > > > - and has determinant 1. > > > > > Now I need to figure out how to determine matrix M, such that > > > M~*Q*M is diagonal matrix. The diagonal entries of M~*Q*M > > > are three square representation of n. > > > > See qfgaussred > > > > Cheers, > > Bill. > > > Thanks, but that matrix is not the matrix M I search for. Yes, you need to read the documentation... ? Q=[41,50,1;50,61,0;1,0,62] %1 = [41,50,1;50,61,0;1,0,62] ? M=qfgaussred(Q) %2 = [41,50/41,1/41;0,1/41,-50;0,0,1] ? D=matrix(#M,#M,i,j,if(i==j,M[i,j])) %3 = [41,0,0;0,1/41,0;0,0,1] ? R=matrix(#M,#M,i,j,if(i==j,1,M[i,j])) %4 = [1,50/41,1/41;0,1,-50;0,0,1] ? R~*D*R == Q %5 = 1 ? R~^-1*Q*R^-1 %6 = [41,0,0;0,1/41,0;0,0,1] Cheers, Bill.