Home  >  Article  >  What is NaN?

What is NaN?

尚
Original
2020-03-02 09:17:5817201browse

What is NaN?

NaN (Not a Number, not a number) is a type of value of numeric data type in computer science, which represents an undefined or unrepresentable value. Often used in floating point operations. NaN was first introduced in the IEEE 754 floating-point standard in 1985.

In floating point number operations, the concepts of NaN and infinity are different, although both are special values ​​when representing real numbers with floating point numbers. Invalid Operation is also different from arithmetic overflow (which may return infinity) and arithmetic underflow (which may return the smallest general value, special value, zero, etc.).

There are three types of operations that return NaN:

Operations with at least one parameter being NaN

Infinitives

Real number operations that produce complex results.

For more related tutorials, please pay attention to PHP Chinese website!

The above is the detailed content of What is NaN?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn