In Java, what does NaN mean?

后端 未结 11 2372
时光说笑
时光说笑 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 stands for Not a Number. It is used to signify any value that is mathematically undefined. Like dividing 0.0 by 0.0. You can look here for more information: https://web.archive.org/web/20120819091816/http://www.concentric.net/~ttwang/tech/javafloat.htm

    Post your program here if you need more help.

提交回复
热议问题