nan

nan

[18] NaN は、ではない値です。

[19] 0除算のような結果が定義されない演算の結果として使われたり、 数値として解釈できない値を数値型型変換した結果として使われたりします。

NaN (JavaScript)

[1]

The primitive value NaN represents the set of IEEE Standard "Not-a-Number" values. This value is a member of the Number type.

[2]

名前
NaN
Number

[3] XQuery 1.0 and XPath 2.0 Functions and Operators (Second Edition) ( ( 版)) http://www.w3.org/TR/2010/REC-xpath-functions-20101214/#numeric-types

nan, -nan (Perl)

[4]

$ perl -MPOSIX -MDevel::Peek -e 'print Devel::Peek::Dump POSIX::fmod(12,0)'
SV = NV(0x1c3cca8) at 0x1c2c780
  REFCNT = 1
  FLAGS = (PADTMP,NOK,pNOK)
  NV = -nan

[5] 文字列化すると Perl 5.22 では NaN ですが、 Perl 5.14 では nan でした。

[6] perl -MPOSIX -e 'print POSIX::fmod(12,0)' は Perl 5.14 では -nan、 5.22 では NaN になります。

[7] pack 'L', 0+'NaN' は 5.22 以降は例外投げます。 以前は 0 扱いでした。

歴史

[8] Inline the infinite/NaN argument handling in 2d canvas methods (zcorpan著, ) https://github.com/whatwg/html/commit/6f2c0e884e3a7974637514b04e62f7352b6e405d

[9] XQuery 3.1: An XML Query Language () https://www.w3.org/TR/2017/REC-xquery-31-20170321/#id-static-decimal-format-NaN

[10] XML Path Language (XPath) 3.1 () https://www.w3.org/TR/2017/REC-xpath-31-20170321/#id-static-decimal-format-NaN

[11] XPath and XQuery Functions and Operators 3.1 () https://www.w3.org/TR/2017/REC-xpath-functions-31-20170321/#op.numeric

[12] Clarify that unrestricted doubles and floats include NaNs. (#393) (tobie著, ) https://github.com/heycam/webidl/commit/44d0f24f4ef6632bf49dcf1650ff0d3c64778943

[13] 29240 – Clarify whether NaN is allowed in float/double types () https://www.w3.org/Bugs/Public/show_bug.cgi?id=29240

[14] Clarify that unrestricted doubles and floats include NaNs. by tobie · Pull Request #393 · heycam/webidl () https://github.com/heycam/webidl/pull/393

[15] Do nothing for NaN in setTransform(transform)/addPath(b, transform) (zcorpan著, ) https://github.com/whatwg/html/commit/5b19b37c6c6d12f0526afc258686206550ac415c

[16] Canvas 2d context setTransform() functionality is unclear when argument contains NaN · Issue #2845 · whatwg/html () https://github.com/whatwg/html/issues/2845

[17] Do nothing for NaN in setTransform(transform)/addPath(b, transform) by zcorpan · Pull Request #2975 · whatwg/html () https://github.com/whatwg/html/pull/2975

[20] JavaScript で CPU が Intel かどうかを判定する(ついでに JIT を検知する), , http://nmi.jp/2023-01-11-Detecting-Intel-Arch-in-JavaScript

[21] fingerprinting vector