Added linear interpolation out-of-range cases