There is a Table of pairs , which defines pieces bounds. And we are using straightforward algorithm:
y = f(x)
- Calculate index n in Table using x
- Get Yn and Yn+1, compute linear interpolation Y
Y is the answer.
So i think, there must be more efficient method, could you please point me?