title: Floating point exception (core dumped)
body: <p>I have a long program, which consists of one header file, and two source files, in the first one I have written the implementations of the functions, and in the second one (which is my main), I call and execute them. Though, at one point I get an error message saying </p>
  
  <blockquote>
    <p>Floating point exception (core dumped)</p>
  </blockquote>
  
  <p>and the program stops.</p>
  
  <p>As I said there are lots of lines of code, therefore, I'm not able to post my whole source code here, though I will post the most relevant parts, and where error occurs.</p>
  
  <p>My error occurs when I try to call this function (below you can find its implementation):</p>
  
  <pre><code>void chest_first(Complex* FFTInput, Complex* IFFTOutput, Complex* HFirst)
  {
      int i;
  
      for(i = 0; i &lt; 64; i++)
      {
          HFirst[i].real = FFTInput[i].real / IFFTOutput[i].real;
          HFirst[i].imag = FFTInput[i].imag / IFFTOutput[i].imag;
      }
  
  }
  </code></pre>
  
  <p>In this case Complex, is a type definition that I have defined.</p>
  
  <pre><code>typedef struct {
      int real, imag;
  } Complex;
  </code></pre>
  
  <p>Here is the part from the main, where this function is called.</p>
  
  <pre><code>  Complex HFirst[64];
  
    if((strcmp(channel, "LS") == 0) || (strcmp(channel, "ls") == 0))
    {
        if(i == 1)
          chest_first(fft_input, ifft_bpsk_output, HFirst);
        .
        .
        .
    }
  </code></pre>
  
  <p>I have earlier called some other function, which put values to fft_input and ifft_bpsk_output, which are both Complex arrays with 64 elements.</p>