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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ERROR IN BIG NUMBERS

Status
Not open for further replies.

baharengineer

Programmer
Jul 9, 2010
42
IR
i have some line of code like :
VEC(1)=0.0
VEC(2)=0.0
DO 5 I=3,MM5
5 VEC(I)=1.0/1.E50
ITRY=0
15 CONTINUE
ITRY=ITRY+1
AMAX=0.0
DO 25 I=1,MM5
A(I)=0.0
DO 20 J=1,MM5
20 A(I)=A(I)+VEC(J)*CMAT(I,J)
IF(ABS(A(I)).GT.ABS( AMAX)) AMAX=A(I)
25 CONTINUE
DO 30 I=1,MM5
A(I)=A(I)/AMAX
30 CONTINUE
IF(ITRY.EQ.4) GO TO 100
DO 40 I=1,MM5
40 VEC(I)=A(I)/1.E50
GO TO 15

that program has error after run because E50 and has error for over or under flow !

why i have error? i compile via compaq visual fortran 6.6

and i have some line like this:
ISCALE=0
R1=10.0**100
R2=1.0/R1
that line **100 has warning for overflow too

whether i cannot have big number in visual fortran ?
my program language is fortran IV!!!

please tell me how can i fix this
thx
 
sorry i forget : in my program vec is defined like this:

DIMENSION VEC(5)
 
I think xwb is probably a lot more qualified to attempt to figure out what's going on there (I don't know "vintage" Fortrans, or as much as he* does about Fortran in general), but here's the general trend I'm seeing in this code you keep posting: it seems like it was all written by someone else, and badly! Or at least, so that much of it isn't easily compilable nowadays. Where and when it compiled, I don't know, but is it worth the hassle of having to (seemingly) change every third line of it?

* "he" presumably.

--------------------------------------
Background: Chemical engineer, familiar mostly with MATLAB, but now branching out into real programming.
 
YES this program write by nasa in 1987

and i must correctly execution this

this is my job now

i have a project on that

and this program has output , there is pdf of documentation on nasa!!!

this is error that i get

(1513) : Warning: Overflow occurred while evaluating constant expression.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top