The comment paragraph
/* This program computes the first max_coeff + 1 terms of the discrete Fourier transform (h1, h2) of the function g, which is represented as the array
h1 is the cosine component and h2 is the sine component of the Fourier transform; h1 and h2 are represented as the arrays:
h1[0], h1[1], ..., h1[max_coeff]
h2[0], h2[1], ..., h2[max_coeff]
The program prints the amplitude spectrum
for i = 1, ..., max_coeff.
The input must be of the form