double fastBellFunc(double x) { var x2 = x * x; if (x2 <= 0.25) return 1 - 2 * x2; return (1 - x2) / (8 * x2) + 1 / 8.0; }