code: def _evaluate3(nodes, x_val, y_val):
      
      # NOTE: This may be (a) slower and (b) less precise than
      #       hard-coding the determinant.
      sylvester_mat = np.zeros((6, 6), order="F")
      delta = nodes - np.asfortranarray([[x_val], [y_val]])
      delta[:, 1:3] *= 3.0
      # Swap rows/columns so that x-y are right next to each other.
      # This will only change the determinant up to a sign.
      sylvester_mat[:2, :4] = delta
      sylvester_mat[2:4, 1:5] = delta
      sylvester_mat[4:, 2:] = delta
      return np.linalg.det(sylvester_mat)
docs: Helper for :func:`evaluate` when ``nodes`` is degree 3.
  
      Args:
          nodes (numpy.ndarray): ``2 x 4`` array of nodes in a curve.
          x_val (float): ``x``-coordinate for evaluation.
          y_val (float): ``y``-coordinate for evaluation.
  
      Returns:
          float: The computed value of :math:`f(x, y)`.