title: Fortran function returning NaN
body: <p>I am trying to find functional value by iteration. Here is my code.</p>
  
  <pre><code>   x(3)=g1
     x(4)=1.0
     x(5)=g2
     x(8)=1.0
     x(15)=1.0
  
  
  
      a11=x(10)**2!x(7)**2+x(8)**2+x(9)**2+x(10)**2
      a12=x(7)*x(12)!+x(8)*x(13)+x(9)*x(14)+x(10)*x(15)
      a21=a12
      a22=x(12)**2+x(13)**2+x(14)**2+x(15)**2
      d1=-(x(2)*x(7)+x(3)*x(8)+x(4)*x(9)+x(5)*x(10))
      d2=-(x(2)*x(12)+x(3)*x(13)+x(4)*x(14)+x(5)*x(15))
  
     det0=a11*a22-a12*a21
     det1=d1*a22-d2*a12
     det2=d2*a11-d1*a21
  
     dx=det1/det0
     dy=det2/det0
  
       p1=an+3.
       p2=an+1.
       f(1)=x(2)
       f(2)=x(3)
       f(3)=-p1*x(1)*x(3)+2.*p2*x(2)**2-x(4)
       f(4)=x(5)
       f(5)=-pr*p1*x(1)*x(5)+4.*an*x(2)*x(4)
  
       do k=1,2
       i(1)=5*k+1
       do j =2,5
        i(j)=i(j-1)+1
       end do
       f(i(1))=x(i(2))
       f(i(2))=x(i(3))
       f(i(3))=-p1*(x(1)*x(i(3))+x(3)*x(i(1)))+4.*p2*x(2)*x(i(2))-x(i(4))
       f(i(4))=x(i(5))
       f(i(5))=-pr*p1*(x(1)*x(i(4))+x(5)*x(i(1)))+4.*an*pr*   (x(2)*x(i(4))+x(4)*x(i(2)))
       end do
  </code></pre>
  
  <p>I am expecting some numerical value but some of variable giving NaN value <code>a11,a12,a21,a22,det0,det1,det2</code>. I guess that functions are creating problem.</p>