Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29253 Discussions

run time error m6201 math log domain error

shuddle
Beginner
667 Views
hi all,
please help me to fix the above error.
C**********************************************************************************
FUNCTION HP(T)
C**********************************************************************************
REAL KA,KP,KR,MC,MH,MO,NA,N,NADNAX,NMO,NP,NPO,NX,KRR
COMMON/CHEM/KA,KP,KR,N(5),NA,NADNAX,NMO,NP,NPO,NX,RMR,KRR,
# MC,MH,MO,R,RLITAT,RMIX,Y,YCC,YMIN,PMOLWT
COMMON/CPCOEF/CV,ACPF,BCPF,ACPA,BCPA,AL(5),AH(5),
# BL(5),BH(5),CL(5),CH(5)
HP=0.
IF(T.GT.1600.0) GO TO 20
DO 1 I=1,5
1 HP=HP+N(I)*(AL(I)+BL(I)*T+CL(I)*ALOG(T))
RETURN
20 DO 3 I=1,5
3 HP=HP+N(I)*(AH(I)+BH(I)*T+CH(I)*ALOG(T))
RETURN
END
0 Kudos
1 Reply
TimP
Honored Contributor III
667 Views
As you haven't done anything here to take care of negative values of T, it seems likely those would produce the reported diagnostic.
0 Kudos
Reply