-- -*- M2-comint -*- hash: 18145318784829677776

i1 : frac QQ[x];

i2 : q = (x^5 - 6*x^4 + 11*x^3 - 2*x^2 - 12*x + 8)/(x^4 - 5*x^2 + 7*x + 1);

i3 : getGlobalUnstableA1Degree q

o3 = (| -68 38  11  -14 1  |, -53240)
      | 38  -63 63  -29 7  |
      | 11  63  -84 39  -5 |
      | -14 -29 39  -16 0  |
      | 1   7   -5  0   1  |

o3 : UnstableGrothendieckWittClass

i4 : deg1 = getLocalUnstableA1Degree(q, -1)

                    5
o4 = (| -5/27 |, - --)
                   27

o4 : UnstableGrothendieckWittClass

i5 : deg2 = getLocalUnstableA1Degree(q, 1)

o5 = (| -2 |, -2)

o5 : UnstableGrothendieckWittClass

i6 : deg3 = getLocalUnstableA1Degree(q, 2)

                            1331
o6 = (| 0    0    11/3 |, - ----)
      | 0    11/3 0    |     27
      | 11/3 0    0    |

o6 : UnstableGrothendieckWittClass

i7 : degSum = addGWuDivisorial({deg1, deg2, deg3}, {-1, 1, 2})

o7 = (| -5/27 0  0    0    0    |, -53240)
      | 0     -2 0    0    0    |
      | 0     0  0    0    11/3 |
      | 0     0  0    11/3 0    |
      | 0     0  11/3 0    0    |

o7 : UnstableGrothendieckWittClass

i8 : isIsomorphicForm(degSum, getGlobalUnstableA1Degree q)

o8 = true

i9 : R = CC[x];

i10 : f = (x-1)*(x-2)*(x-3);

i11 : g = (x-1)*(x-4);

i12 : getGlobalUnstableA1Degree(f,g,linearTolerance => 1e-6)

o12 = (| 1 0 |, -2)
       | 0 1 |

o12 : UnstableGrothendieckWittClass

i13 : 
