翻訳と辞書
Words near each other
・ Namyit Island
・ Namysłaki
・ Namysłów
・ Namysłów County
・ Namysłów Town Hall
・ Namyślin
・ Namzad
・ Namárië
・ Namık İsmail
・ Namık Kemal
・ Namık Kemal House Museum, Tekirdağ
・ Namık Kemal University
・ Namık Kemal Yolga
・ Namık Kemal Zeybek
・ Namık Tan
NaN
・ Nan
・ Nan (surname)
・ Nan A. Talese
・ Nan Achnas
・ Nan Agle
・ Nan Aron
・ Nan Aspinwall
・ Nan Aye Khine
・ Nan Baker
・ Nan Bao
・ Nan Bentzen Skille
・ Nan Bois, Port-Salut, Haiti
・ Nan Braunton
・ Nan Britton


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

NaN : ウィキペディア英語版
NaN

In computing, NaN, standing for not a number, is a numeric data type value representing an undefined or unrepresentable value, especially in floating-point calculations. Systematic use of NaNs was introduced by the IEEE 754 floating-point standard in 1985, along with the representation of other non-finite quantities like infinities.
Two separate kinds of NaNs are provided, termed quiet NaNs and signaling NaNs. Quiet NaNs are used to propagate errors resulting from invalid operations or values, whereas signaling NaNs can support advanced features such as mixing numerical and symbolic computation or other extensions to basic floating-point arithmetic. For example, 0/0 is undefined as a real number, and so represented by NaN; the square root of a negative number is imaginary, and thus not representable as a real floating-point number, and so is represented by NaN; and NaNs may be used to represent missing values in computations.〔Bowman, Kenneth (2006) An introduction to programming with IDL: Interactive Data Language. Academic Press. p. 26 ISBN 0-12-088559-X〕〔William H. Press, Saul A. Teukolsky, William T. Vetterling (2007) Numerical recipes: the art of scientific computing.p. 34 Cambridge University Press, ISBN 0-521-88068-8〕
== Floating point ==

In floating-point calculations, NaN is not the same as infinity, although both are typically handled as special cases in floating-point representations of real numbers as well as in floating-point operations. An invalid operation is also not the same as an arithmetic overflow (which might return an infinity) or an arithmetic underflow (which would return the smallest normal number, a denormal number, or zero).
IEEE 754 NaNs are represented with the exponent field filled with ones (like infinity values), and some non-zero number in the significand (to make them distinct from infinity values); this representation allows the definition of multiple distinct NaN values, depending on which bits are set in the significand, but also on the value of the leading sign bit (not all applications are required to provide distinct semantics for those distinct NaN values).
For example, a bit-wise IEEE floating-point standard single precision (32-bit) NaN would be: s111 1111 1xxx xxxx xxxx xxxx xxxx xxxx where ''s'' is the sign (most often ignored in applications) and ''x'' is non-zero (the value zero encodes infinities). Some bits from ''x'' (usually and preferably the first one) are used to determine the type of NaN: quiet NaN or signaling NaN. The remaining bits encode a payload (most often ignored in applications).
Floating-point operations other than ordered comparisons normally propagate a quiet NaN (''qNaN''). Floating-point operations on a signaling NaN (''sNaN'') signal the invalid operation exception, the default exception action is then the same as for qNaN operands and they produce a qNaN if producing a floating-point result.
A comparison with a NaN always returns an ''unordered result'' even when comparing with itself. The comparison predicates are either signaling or non-signaling; the signaling versions signal the invalid operation exception for such comparisons. The equality and inequality predicates are non-signaling so ''x'' = ''x'' returning false can be used to test if ''x'' is a quiet NaN. The other standard comparison predicates are all signaling if they receive a NaN operand, the standard also provides non-signaling versions of these other predicates. The predicate ''isNaN(x)'' determines if a value is a NaN and never signals an exception, even if ''x'' is a signaling NaN.
The propagation of quiet NaNs through arithmetic operations allows errors to be detected at the end of a sequence of operations without extensive testing during intermediate stages. However, note that depending on the language and the function, NaNs can silently be removed in expressions that would give a constant result for all other floating-point values e.g. NaN^0, which may be defined as 1, so in general a later test for a set INVALID flag is needed to detect all cases where NaNs are introduced 〔(【引用サイトリンク】title=Lecture Notes on the Status of IEEE Standard 754 for Binary Floating-Point Arithmetic )〕 (see section Function definition below for further details).
In section 6.2 of the revised IEEE 754-2008 standard there are two anomalous functions (the maxnum and minnum functions that return the maximum of two operands that are expected to be numbers) that favor numbers — if just one of the operands is a NaN then the value of the other operand is returned.
The (NaN 'toolbox' ) for GNU Octave and MATLAB skips all NaNs when computing aggregates (like averages, standard deviations, etc.). NaNs are ''assumed'' to represent missing values and so the statistical functions ignore NaNs in the data instead of propagating them.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「NaN」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.