1. A processor, comprising: a linear approximator; and a front end including circuitry to assign linear approximation of a nonlinear function to the a linear approximator; wherein the linear approximator includes circuitry to: divide a range of values for the linear approximation into a defined number of equal segments; perform linear approximation for each segment; move borders between the segments such that the segments are not of equal length; repeat linear approximation for each segment; and return values for the linear approximation.