double cubicSigmoidFunc(double x) { if (x.abs() >= 1) return 0.03 * x + x.sign * 0.96; return -0.48 * x * x * x + 1.47 * x; }