Completed sum of square difference