1. A method performed by a computer processor in conjunction with a lookup table, the method comprising: computing, based on an input value (Xin) being searched for within an index vector (X) of the lookup table, a value of a vector index to generate a computed vector index; determining whether the computed vector index is less than a length of an index vector (N); when it is determined that the computed vector index is greater than the length of the index vector (N), re-computing the computed vector index by decrementing the length of the index vector (N) by one to generate a re-computed vector index; determining whether the value of the computed vector index is correct to determine whether the index vector (X) is linearly indexed or piecewise indexed; when either the value of the computed vector index is determined to be correct or when the re-computed vector index is generated, executing an interpolation routine for a linearly indexed index vector using a presently computed vector index to determine an interpolated output value (Yout) that corresponds to the input value (Xin), wherein the presently computed vector index is either the computed vector index or the re-computed vector index; and when the value of the computed vector index is determined to be incorrect and the index vector (X) is determined to be piecewise indexed, executing an interpolation routine for a piecewise indexed index vector to determine the interpolated output value (Yout) that corresponds to the input value (Xin).