I need some help from this forum. Initially it is posted in the "newbie-linux" forum, where it is suggested to move it to this forum.
I am compiling a program in c language in my linux machine-redhat linux 7.3, gcc version 2.96. The program involves some arrays of "double precision floating points", defined and evaluated under different routines.
While running the program I get some elemnts of the arrays to be "nan". (These elements are computed in one operation, stored in the array and used later for further computation.) The problem is peculiar in the sense that when I try to use the stored value of the element and try to learn its value just before using, it shows "nan". But when I check, if really it was an illegal computation by using "printf" immediately sfter coputation/storing the element, it shows a value to the element and stores the same value, allows its use in later operations; and the problem of "nan" vanishes. i.e., using "printf" after computation of the element removes the problem of having a "nan". However that is not desirable.
When I searched in the net I came across some reference to similar instances but could not get a clear indication to the "follow up action" (probably due to my own limitation, as I am quite new to linux os). I hope some suggestion from this forum will help me coming out of my problem.
(The original code was written by a third party. I am trying to modify it to suit my requirement and there, I get the problem. I am enclosing the "problematic part" of the program.
Removed on 12/1/04 at 1.05 p.m.)
To be honest I am not having any clue about the problem.
Thanking in advance,