Included the max value in the inverse interval.

Included the max value in the inverse interval to make it the
complementary of the original interval.

(cherry picked from commit d0d7f8783bbe16e0220550b7cef31d18bbcfaa85)