请输入您要查询的字词:

 

单词 NotANumber
释义

not a number


In a computer, not a number (usually abbreviated NaN) indicates that an arithmetical operation has resulted in a value that is not a number understood (or representable) by the computer. Division by zero is one frequent cause of a result being NaN. Asking for the square rootMathworldPlanetmath of a negative number is another operation that can result in NaN (unless the computer has been programmed to recognize imaginary numbersMathworldPlanetmath).

NaN is not a specific value that can be tested for with the usual comparison operators. The programmer is advised to test for NaN with a special function provided by the programming language (such as isNaN(x) in JavaScript.

Generally, computer algebra systems do not report NaN results even if they do display an error message for a given operation.

References

  • 1 David Flanagan, JavaScript the Definitive Guide: The Definitive Guide. New York: O’Reilly (2006): 24
随便看

 

数学辞典收录了18232条数学词条,基本涵盖了常用数学知识及数学英语单词词组的翻译及用法,是数学学习的有利工具。

 

Copyright © 2000-2023 Newdu.com.com All Rights Reserved
更新时间:2025/5/4 7:09:30