
C FTANGLE v1.30, created with UNIX on "Tuesday, May 11, 1993 at 10:55." 
C COMMAND LINE: "ftangle Newton.web -z"
C RUN TIME: "Thursday, June 10, 1993 at 19:55."
C WEB FILE:    "Newton.web"
C CHANGE FILE: (none)
C* 7: * 
*line 162 "Newton.web"
      program cosine
      implicit undefined(a-z)
C* 8: * 
*line 179 "Newton.web"
      real*8 x_0,x,delta_x
C* :8 * 
C* 9: * 
*line 185 "Newton.web"
      integer k,limit
C* :9 * 
C* 14: * 
*line 250 "Newton.web"
      real*8 delta_x_max,delta_x_prev
C* :14 * 
*line 165 "Newton.web"
      
C* 10: * 
*line 200 "Newton.web"
      x_0=1.2d0
      delta_x=0.000001d0
      limit=10
C more than safe 
C* :10 * 
C* 15: * 
*line 255 "Newton.web"
      
      delta_x_prev=0.0d0
      delta_x_max=0.5d0
C* :15 * 
*line 166 "Newton.web"
      
C* 11: * 
*line 210 "Newton.web"
      k=1
      do while((delta_x.GT.0.0d0).AND.(k.LE.limit))
C* 12: * 
*line 231 "Newton.web"
      delta_x=-(cos(x_0))/(-sin(x_0))
C* :12 * 
*line 213 "Newton.web"
      
C* 16: * 
*line 264 "Newton.web"
      if(delta_x.GT.delta_x_max)then
      delta_x=delta_x_max
      else if(delta_x.LT.(-delta_x_max))then
      delta_x=-delta_x_max
      end if
      
C* :16 * 
C* 17: * 
*line 281 "Newton.web"
      if((delta_x*delta_x_prev).LT.0.0d0)then
      write(*,*)'Oscillating',k
      end if
C* :17 * 
*line 214 "Newton.web"
      
C* 13: * 
*line 237 "Newton.web"
      x=delta_x+x_0
      x_0=x
      delta_x_prev=delta_x
C* :13 * 
*line 215 "Newton.web"
      
      k=k+1
      end do
C* :11 * 
*line 167 "Newton.web"
      
C* 18: * 
*line 290 "Newton.web"
      write(*,*)'The solution to cos(x)=0 is ',x
C* :18 * 
*line 168 "Newton.web"
      
      stop
      end
C* :7 * 
