29240
2015-10-26 07:14:53 +0000
Clarify whether NaN is allowed in float/double types
2017-07-30 12:58:58 +0000
1
1
1
Unclassified
WebAppsWG
WebIDL
unspecified
PC
All
RESOLVED
FIXED
P2
normal
---
1
geoffers+w3cbugs
cam
mike
public-script-coord
tobie.langel
public-webapps-bugzilla
oldest_to_newest
123943
0
geoffers+w3cbugs
2015-10-26 07:14:53 +0000
Float is "set of finite single-precision 32 bit IEEE 754 floating point numbers", unrestricted float is "set of all possible single-precision 32 bit IEEE 754 floating point numbers, finite and non-finite".
It seems obvious that NaN is not a float: it's not in the set of finite numbers. It also would appear that NaN is not a unrestricted float as it isn't a number. However, elsewhere in the spec we see the constant NaN exists as a unrestricted float.
We should clarify this (and also for the similar double case). There's also the question of whether the set contains 2^24-2 representations of NaN or a single representation of NaN (like the Number type in ES).
128794
1
tobie.langel
2017-07-28 13:59:01 +0000
Tentative fix: https://github.com/heycam/webidl/pull/393
128808
2
tobie.langel
2017-07-30 12:58:58 +0000
Fixed in https://github.com/heycam/webidl/commit/44d0f24