title: Why do I keep getting 0 as output?
body: <p>I'm generating a module that calculates the Legendre polynomials but once I reach to ˋP4(x)ˋ I start getting 0 as output. </p>
  
  <p>For instance ˋP4(x) = 1/8 * (35x^4 - 30x^2 +3)ˋ</p>
  
  <p>So I've decided to make the following program in order to check any possible mistake.</p>
  
  <pre><code>real (kind = 8) :: x,y
  integer :: i
  
  y = 0.0, x = -1.0
  
  do i = 1, 30
  
  y = ((1/8)*((35*(x**4))-(30*(x**2))+3)
  
  write (6,*) y
  
  cont = cont + 0.066
  
  end do
  </code></pre>
  
  <p>The output of this program is always the same 0.000000</p>
  
  <p>Surprisingly, it shows the changes of sign but it still displays -0.000000. </p>