In Java, what does NaN mean?

后端 未结 11 2388
时光说笑
时光说笑 2020-11-22 14:00

I have a program that tries to shrink a double down to a desired number. The output I get is NaN.

What does NaN mean in Java?<

11条回答
  •  借酒劲吻你
    2020-11-22 14:41

    NaN means "Not a number." It's a special floating point value that means that the result of an operation was not defined or not representable as a real number.

    See here for more explanation of this value.

提交回复
热议问题