srm610 div1 900 piecewise linear function