A function returns a list which contains of float values. If I plot this list, I see that some of the float values are equal -1.#IND. I also checked the type of those -1.#IND values. And they are also of float type.
But how can I understand this -1.#IND values? What do they represent or stand for?
A function returns a list which contains of float values. If I plot this
Share
-1.#INDmeans indefinite, the result of a floating point equation that doesn’t have a solution. On other platforms, you’d getNaNinstead, meaning ‘not a number’,-1.#INDis specific to Windows. On Python 2.5 on Linux I get:You’ll only find this on python versions 2.5 and before, on Windows platforms. The
float()code was improved in python 2.6 and consistently usesfloat('nan')for such results; mostly because there was no way to turn1.#INFand-1.#INDback into an actualfloat()instance again:On versions 2.6 and newer this has all been cleaned up and made consistent: