Click to See Complete Forum and Search --> : 1.#inf


xargon
February 4th, 2003, 09:00 AM
Hi,

I am getting a weird error. While printing the contents of a float array, some of the entries are printed as 1.#INF

Is this divide by zero or infinity error??

Also, this only happens when I declare the array as float, it is all right when I declare the array as double.

Any ideas?

Xargon

gjs368
February 4th, 2003, 09:14 AM
this only happens when I declare the array as float, it is all right when I declare the array as double Sounds like you have exceeded the limits of a float for some of the stored elements in your array.

A float can hold values in the range of 3.4E +/- 38 (7 digits), and a double in the range of 1.7E +/- 308 (15 digits).

If you need to keep the values as they currently are, you would be better off to continue to use the array of doubles to hold them.