Thanks everyone, for all the help previously.
My code is running, for some files but not for others.
I've attached six files (and the C code) to this posting. Each file has various lenghs and values.
When I start using the code for processing, I'll have a .txt with seven years (2555 days) of data for it to loop through.
The code runs fine with the first two files. If I run the third file, it works fine until line 59. For example:
8 0.00 0.000 0.000 0.000 -0.000 0.000 -0.000 0.000 0.000 0.000
59 0.000 -inf nan -inf inf nan inf -inf nan -inf
60 0.000 nan nan nan -inf nan -inf inf nan nan
61 0.000 nan nan nan nan nan nan nan nan nan
62 0.000 nan nan nan nan nan nan nan nan nan
Files four and five run fine. File 6 does not. Instead it works fine until line 201.
200 0.000 28.336 0.000 19.991 0.000 0.000 0.000 -0.000 -0.000 0.000
201 0.000 -8093828734616807705369824168368363488770529427456. 000 -12913579564.136 -51390762511607983407194125328182191452808282112.00 0 8093828734616807705369824168368363488770529427456. 000 12913579564.136 51390762511607983407194125328182191452808282112.00 0 -8093828734616807705369824168368363488770529427456. 000 -12913579564.136 -51390762511607983407194125328182191452808282112.00 0
202 0.000 85368343369181595663949439458640250954538499456987 9054840307157953354082032384212992.000 544815528226548568775005951289180859584741376.000 48783214515008478275437554298480275036083149913838 034599564383102524958464540672.000 -85368343369181595663949439458640250954538499456987 9054840307157953354082032384212992.000 -544815528226548568775005951289180859584741376.000
Any advice or suggestions? I'm getting a bit frustrated.