Hello,

I wrote the following code to solve an equation by iteration but I never get a reasonable answer.

do f=0.0000,180.0000 y= (Thita_ow*pi/180d0) + (f*pi/180d0) - pi - ((cos(Thita_ow*pi/180d0)*cos((Thita_ow-Half_Angle)*pi/180d0))/(sin(Half_Angle*pi/180))) & + ((2*cos(Thita_ow*pi/180d0)-cos(f*pi/180d0))*((cos((f+Half_Angle)*pi/180d0))/(sin(Half_Angle*pi/180d0)))) if (y==0.0) exit end do ! Creating the TxT file open(unit=3 , file='test.txt') write(3,*) f, y close(unit=3)

Any help ?