NAN means Not A Number, and IND means an indefinite number. But what is the difference between the two. As we can imagine, both in C ++.
But what is the difference between the two.
They are both the same. Some platforms prefer not to display the number as some option NaN, while others prefer to display it as some option IND.
NaN
IND
As we can imagine, both in C ++.
std::numeric_limits<double>::quiet_NaN()(or floator long doubleif you want).
std::numeric_limits<double>::quiet_NaN()
float
long double
, double, 1.#INF Windows inf Linux
1.#INF
, , . sqrt(-1.0) log(-1.0) NaN, "", " " ".
sqrt(-1.0)
log(-1.0)
Windows NaN -1.#IND ( "IND" "" ), Linux nan. , nan, 0/0, 0 * ∞ ∞/∞.
-1.#IND
nan
Refernce Link1
Refernce Link2