anchor.diff:          Q,R
   
       /// QR factorization function for sparse matrices, returns Q as a product of givens rotations and R as upper triangular
  -    let QRSparse(A:SparseMatrix<float>) =
  -        
  -        // Copies the row of a Sparsematrix into a Sparsevector
  -        let CopyRow(nnz:int, offset:int, A:SparseMatrix<float>) =
  +    let QRSparse (A:SparseMatrix<float>) =
  +
  +        /// Copies the row of a Sparsematrix into a Sparsevector
  +        let CopyRow (nnz:int) (offset:int) (A:SparseMatrix<float>) =
               let sparseVector = ResizeArray<(int*float)>()
               for i=nnz-1 downto 0 do
                   if(not (A.SparseValues.[i+offset] = 0.0)) then
  
positive.code:                 else
                     value * -1.0
  
          let encode(c:float, s:float) = 
              if(abs(s) < c) then
                  s
              else
                  Copysign(1.0/c, s)
  
          // Apply the givens rotation on 2 Sparsevectors
          let applyGivens( x : ResizeArray<(int*float)>, y : ResizeArray<(int*float)>) = 
              let a = snd x.Front
              let b = snd y.Front
      
  
negative.code:             R.Add(ResizeArray<(int*float)>())
  
          for a = 0 to m-1 do
              let mutable row = CopyRow (A.SparseRowOffsets.[a+1] - A.SparseRowOffsets.[a]) A.SparseRowOffsets.[a] A
              let mutable q = 0
              while((not row.IsEmpty) && fst row.Front < a && fst row.Front < n) do
                  let j = fst row.Front
  