number --> -1.#ind

I am calculating some operations with arrays. At one point my array give me this value on the screen --> -1.#ind

What is happening¿?
closed account (zb0S216C)
#IND: Attempt to divide by zero.
#NAN: Not-a-number. It usually means the given number exceeds the numerical range of its type.
#QNAN: Quiet non-a-number. A string representation. This only applies to floating point values.

Edit:

You can validate a number's range by using std::numeric_limits[1] within <limits>. Here's an example:

1
2
3
4
5
6
7
8
9
10
#include <iostream>
#include <limits>

int main(void)
{
    int Value(345345);

    if(Value > std::numeric_limits<int>::max())
        std::cout << "The value exceeds the range\n";
}


References:
[1] http://www.cplusplus.com/reference/std/limits/numeric_limits/


Wazzak
Last edited on
Topic archived. No new replies allowed.