sinc function

double sinc (double x)

Normalized Sinc function. sinc(x) = sin(pi*x)/(pi*x).

Implementation

double sinc(double x) {
  double z = constants.pi * x;
  return almostEqualI(z, 0.0, 15) ? 1.0 : sin(z) / z;
}