I am writing a piece of code that outputs a list of DOUBLE numbers on screen.
I basically have 2 quantities,
1) a time step
2) a time total
The time step is a very small randomly generated number.
The time total is 0.0 and then time step is added each time to the total.
THE PROBLEM is that the time step prints fine.. the time total doesn't and all it prints is 1.#INF ..or 5.#INF basically it just shows the first figure and then that.. why is it doing it? how to fix it?
Thanks a lot for the help, the code is too long to upload on here but I think that some of you guys might know exactly what's happening and might be able to point me in the right direction as to how to fix it..
The funny thing is, even if I was dividing by zero, why does the total start tripping as soon as the time step does? The stuff above is an example of what I am talking about