Closed Bug 689530 Opened 13 years ago Closed 13 years ago

Relational operators do not handle NaN properly

Categories

(Tamarin Graveyard :: Virtual Machine, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED INVALID

People

(Reporter: brbaker, Unassigned)

References

Details

According to the pre-alpha Expressions spec section 8.4.4.c (and ecma 262 s11.8.5), if either value passed into a relational operator is NaN, then "undefined" should be returned. Currently tamarin will return false.

print(12>NaN): // false, should return undefined
print(12<NaN): // false, should return undefined
Flags: in-testsuite?
Flags: flashplayer-triage+
Flags: flashplayer-qrb?
Flags: flashplayer-needsversioning+
Flags: flashplayer-bug-
See Also: → 640052
I should have continued reading the specification. In the abstract relational comparison algorithm, undefined is returned if one of the values is NaN, however each of the concrete relational comparison operators will return false if the call to the abstract algorithm returns undefined. Retracting bug.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.