Not a Number (NaN)

What does Not a Number (NaN) mean?

Not a Number (NaN) represents an undefined number in floating-point operations. A Not a Number indicator may also be a sign that a variable that is supposed to be a numerical value has been corrupted by text characters or symbols.


Techopedia explains Not a Number (NaN)

When an operating system tries to compile a real number with floating-point operations, there are any number of reasons why it may not be able to represent that number. A false command such as an impossible square root can trigger a NaN value. So can data corruption or clerical errors, as previously mentioned. NaN can also be expressed in many ways. Some operating systems use a hash character (#) along with NaN, or use prefixes and suffixes such as S, Q and %. It should be noted that while sophisticated operating systems can use these errors to deal with error inputs, older and more primitive operating systems might have instead crashed, or become frozen in infinite loops.


Share this Term

  • Facebook
  • LinkedIn
  • Twitter

Survey: Why Is There Still a Gender Gap in Tech?

Do you work in the tech industry? Help us learn more about why the gender gap still exists in tech by taking this quick survey! Survey respondents will also be entered to win a $100 Amazon Gift Card!

Related Reading


DevelopmentProgramming ToolsComputer Science

Trending Articles

Newest Articles

Go back to top