Quantcast
Channel: Intel® Fortran Compiler
Viewing all articles
Browse latest Browse all 3270

Solving Equation by Iteration

$
0
0

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 ?


Viewing all articles
Browse latest Browse all 3270

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>