DEV Community

Discussion on: What is the type of NaN?

smlka profile image
Andrey Smolko • Edited on

You are writing:

Having "Not a Number" value to be a type of number is quite illogical

Following explanation helped me to accept fact that NaN is number type=):

The special values such as infinity and NaN ensure that the floating-point arithmetic is algebraically completed