DEV Community

Discussion on: What is the type of NaN?

Collapse
 
smlka profile image
Andrey Smolko • Edited

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