Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can anyone help please fix my code...I am new to using fortran

Status
Not open for further replies.

100Ash

Programmer
Aug 23, 2011
3
US
Hello All,

I am new to using Fortran, I need to find all the real roots of a non linear eqn. I found a code on the internet and I tried modifying it as per my requirement.

But when I compile I am getting this error "
Error: Type of argument 'x' in call to 'dsqrt' at (1) should be REAL(8), not REAL(4)".
I have uploaded my file. Please someone please guide me through the error, how do I fix it.

Thanks,
Winny
 
The link has the uploaded fortran code, file name "Blood_Vessel_NLE1.

Its a urgent requirment, and I am not able to figure it out as I have very less knowledge of fortran

Thanks,
Winny
 
declare your variable x correctly ( REAL(8) :: x) or use SQRT instead of DSQRT

François Jacq
 
Hi François Jacq ,

Thanks for the revert. I tried declaring as you said and changed dsqrt to sqrt. Its still showing up errors. Can you try from your end and let me know if it works.

I have very little programming knowledge, I am essential using this code to solve for all the roots of a non linear eqn. I used to use Matlab before but now my prof wants me to implement it using fortran.

Can you please try doing it,I would be much thankful for your advice and help.

-Winny
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top