gaussian function

double gaussian(
  1. double x
)

Symmetrical and bell-shaped graph with a peak at 1 and a smooth approach to 0 for both sides of the x-axis.

Implementation

double gaussian(double x) => exp(-pow(x, 2));