double uacslsDeriv(double x) { if (x >= 0) return 0.5; if (x > -1.5) return x * 0.25 + 0.5; return 0.125; }