anchor.diff:              | na, nb when na > 2 && na = nb+1 && (shape a).[na-1] = (shape b).[nb-1] ->
                   // batched mat*vec
                   (batchedMatrixDot a (padRight b)).[Fill, 0]
  -            | na, nb when na > 2 && na = nb && (shape a).[na-2..] = (shape b).[nb-2..] ->
  +            | na, nb when na > 2 && na = nb && (shape a).[na-1] = (shape b).[nb-2] ->
                   // batched mat*mat
                   batchedMatrixDot a b
               | _ -> 
  
positive.code:     ////////////////////////////////////////////////////////////////////////////////////////////////
      // tensor operations
      ////////////////////////////////////////////////////////////////////////////////////////////////         
  
      /// dot product implementation between vec*vec, mat*vec, mat*mat, batched mat*vec, batched mat*mat
      let inline dotImpl (a: ArrayNDT<'T>) (b: ArrayNDT<'T>) =
  
negative.code:     let inline signt (a: #ArrayNDT<'T>) =
          ArrayNDT<'T>.SignT a 
  
      /// Elementwise check if two arrays have same (within machine precision) values.
      let inline isClose (a: ArrayNDT<'T>) (b: ArrayNDT<'T>) =
          let aTol = conv<'T> 1e-8
          let rTol = conv<'T> 1e-5
          abs (a - b) <<<< aTol + rTol * abs b
  
      ////////////////////////////////////////////////////////////////////////////////////////////////
      // reduction operations
      ////////////////////////////////////////////////////////////////////////////////////////////////         
  