Register to reply 
Run time error M6201:MATHlog domain error 
Share this thread: 
#1
Dec2811, 08:50 AM

P: 3

hi all,
i am getting the above problem while executing my fortran program. please help me how to fix it. thank MNM 


#2
Dec2811, 12:55 PM

Mentor
P: 21,215




#3
Dec2911, 10:44 PM

P: 3

Thank you mark44.
But in the program i am taking log of T. see the program attached below. 


#4
Dec3011, 01:00 PM

Mentor
P: 21,215

Run time error M6201:MATHlog domain error
For the convenience of other readers, here's your code. As I already said, your program is attempting to take the log of a number that is not positive. There needs to be some code in this function to guard against an attempt to take the log of the parameter T when it is zero or negative.



#5
Dec3011, 03:34 PM

Mentor
P: 21,215

Somewhat off topic...
I look at a lot of code samples in many different languages, but the ones in Fortran are usually the worst. They are typically nearly impossible to read with their terse variable names that convey almost no indication of what they're being used for, no or little whitespace, and no indentation to help the reader grasp the extent of loops. 


#6
Mar612, 03:13 AM

P: 3

THANK YOU MARK44, I eliminated log error. but now i am facing one more problem that is "array bound exceeded"



#7
Mar612, 09:50 AM

Mentor
P: 21,215

You haven't declared the variables in your two common blocks. See http://www.obliquity.com/computer/fortran/common.html.



Register to reply 
Related Discussions  
How do I do error analysis with a leastsquares fit that puts error bars in the fit?  Math & Science Software  1  
FORTRAN  Error 112 Runtime Error  Programming & Computer Science  1  
How do you count Uncertainty Measurement using Precision Error and Bias Error?  Engineering, Comp Sci, & Technology Homework  0  
Measurement error analyses, fitting min/max slopes to data with error bars.  Set Theory, Logic, Probability, Statistics  2 