Not a Number

What Does Not a Number 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

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.


Related Terms

Margaret Rouse

Margaret is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages.