Piecewise linear interpolation the idea is that our interpolating functions is not going to be a smooth polynomial defined by a formula. Instead, it will be defined by piecing together linear interpolants that go through each consecutive pair of data points. To handle values below the first data point, we'll just extend the first linear interpolants all the way to the left. Similarly, we'll extend the linear function in the last interval all the way to the right.