Finding DC gain of a signal
The 0 FFT bin "DC Value" is equal to the mean of the signal scaled by the number of samples in the FFT.  So a more direct method to compute the DC value is to compute the mean value of the signal directly.

$$FFT_{bin0} =\sum_{n=0}^{N-1}x_n = N\overline x$$