/
556.txt
53 lines (38 loc) · 1.95 KB
/
556.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
* 値 [CODE(JS)@en[NaN]] (JavaScript)
[1]
>The [[primitive value]] [DF[[CODE(JS)@en[NaN]]]] represents the [[set]] of [[IEEE Standard]]
"[[Not-a-Number]]" [[values]]. This [[value]] is a [[member]] of the [CODE(JS)@en[[[Number]]]] [[type]].
;; [CITE[ECMAScript Language Specification (HTML version)]] ([TIME[2009-04-03 04:43:48 +09:00]] 版) <http://bclary.com/2004/11/07/#a-4.3.23>
[2]
:名前:[CODE(JS)@en[[[NaN]]]]
:型:[CODE(JS)@en[[[Number]]]]
[3] [CITE@EN[XQuery 1.0 and XPath 2.0 Functions and Operators (Second Edition)]]
( ([TIME[2010-12-17 00:06:54 +09:00]] 版))
<http://www.w3.org/TR/2010/REC-xpath-functions-20101214/#numeric-types>
* [CODE[nan]], [CODE[-nan]] (Perl)
[4]
[PRE(perl code)[
$ 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
]PRE]
[5] [[文字列化]]すると Perl 5.22 では [CODE[NaN]] ですが、
Perl 5.14 では [CODE[nan]] でした。
[6] [KBD[perl -MPOSIX -e 'print POSIX::fmod(12,0)']]
は Perl 5.14 では [CODE[-nan]]、 5.22 では [CODE[NaN]] になります。
[7] [CODE[pack 'L', 0+'NaN']] は 5.22 以降は[[例外]]を[[投げ]]ます。
以前は 0 扱いでした。
[8] [CITE@en[Inline the infinite/NaN argument handling in 2d canvas methods]]
([[zcorpan]]著, [TIME[2016-09-30 22:38:34 +09:00]])
<https://github.com/whatwg/html/commit/6f2c0e884e3a7974637514b04e62f7352b6e405d>
[9] [CITE@EN[XQuery 3.1: An XML Query Language]]
([TIME[2017-03-20 09:23:33 +09:00]])
<https://www.w3.org/TR/2017/REC-xquery-31-20170321/#id-static-decimal-format-NaN>
[10] [CITE@EN[XML Path Language (XPath) 3.1]]
([TIME[2017-03-20 09:18:04 +09:00]])
<https://www.w3.org/TR/2017/REC-xpath-31-20170321/#id-static-decimal-format-NaN>
[11] [CITE@EN[XPath and XQuery Functions and Operators 3.1]]
([TIME[2017-03-21 16:02:06 +09:00]])
<https://www.w3.org/TR/2017/REC-xpath-functions-31-20170321/#op.numeric>