"Fossies" - the Fresh Open Source Software Archive

Member "pari-2.13.1/src/test/in/qf" (12 Dec 2020, 1581 Bytes) of package /linux/misc/pari-2.13.1.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "qf": 2.13.0_vs_2.13.1.

    1 default(realprecision,38);
    2 qfgaussred([0,7,2,3; 7,0,6,8; 2,6,0,9; 3,8,9,0])
    3 Q=[2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1;-1,2,1,1,1,1,1,1,1,1,1,1,1;-1,1,2,1,1,1,1,1,1,1,1,1,1;-1,1,1,2,1,1,1,1,1,1,1,1,1;-1,1,1,1,2,1,1,1,1,1,1,1,1;-1,1,1,1,1,2,1,1,1,1,1,1,1;-1,1,1,1,1,1,2,1,1,1,1,1,1;-1,1,1,1,1,1,1,2,1,1,1,1,1;-1,1,1,1,1,1,1,1,2,1,1,1,1;-1,1,1,1,1,1,1,1,1,2,1,1,1;-1,1,1,1,1,1,1,1,1,1,2,1,1;-1,1,1,1,1,1,1,1,1,1,1,2,1;-1,1,1,1,1,1,1,1,1,1,1,1,2];
    4 Q[3,7] += 1.25;
    5 Q[7,3] += 1.25; qfsign(Q)
    6 
    7 Q=[8,4,4,4,4,4,4,4,4,4,4,4;4,8,4,4,4,4,4,4,4,4,4,4;4,4,8,0,0,0,3,0,0,0,0,0;4,4,0 ,8,4,4,1,4,4,4,4,4;4,4,0,4,8,4,4,4,4,4,4,4;4,4,0,4,4,8,4,4,4,4,4,4;4,4,3,1,4,4,8 ,4,1,1,1,1;4,4,0,4,4,4,4,8,4,4,4,4;4,4,0,4,4,4,1,4,8,4,4,4;4,4,0,4,4,4,1,4,4,8,4 ,4;4,4,0,4,4,4,1,4,4,4,8,4;4,4,0,4,4,4,1,4,4,4,4,8];
    8 qfminim(Q,,0,2)[1]
    9 qfrep(Q,16)
   10 qfrep(Q,8,1)
   11 qfminim(Q,,,1)
   12 qfminim(Q,8,,1)
   13 qfminim(Q,4,,1)
   14 qfminim([;],4,,1)
   15 qfminim([;],4,,2)
   16 qfminim(Mat(1),,,2) \\ #2262
   17 qfminim(matid(2),0,1,2)
   18 qfminim(matid(2),0,1,1)
   19 qfminim(matid(2),0,1,0)
   20 
   21 
   22 
   23 L=[360815,2283021;-316840,2566404];
   24 qfminim(L~*L,10^16)[2]
   25 qfminim(L~*L,10^16,,2)[2]
   26 forqfvec(v, [3,2;2,3], 3, print(v))
   27 forqfvec(v, [3,2;2,3],, print(v))
   28 forqfvec(v,[;],3,)
   29 forqfvec(v,matid(2),-6, print(".") ) \\ #2237
   30 qfminim(matid(2),-6)
   31 qfminim(matid(2),-6,,2)
   32 x=[1,2,3]~; y=[-1,0,1]~; qfeval(,x)
   33 q=[1,2,3;2,2,-1;3,-1,0]; qfeval(q,x)
   34 qfeval(,x,y)
   35 qfeval(q,x,y)
   36 M=[1,2,3;4,5,6;7,8,9]; qfeval(,M)
   37 qfeval(q,M)
   38 
   39 qfeval(,1)
   40 qfeval(,1,1)
   41 qfeval(Mat(1),x)
   42 qfeval(Mat(x~),x)
   43 qfeval(,1,1)
   44 qfeval(,[1],[1,2])
   45 qfeval(q,[1,2],[1,2])
   46 qfeval(Mat([1,2]),[1,2],[1,2])
   47 qfeval(1,1)