Improve speed and accuracy for correlation() (GH-26135)

1 file changed