Closed bakkot closed 1 year ago
thank you! but can you explain what's the difference of these two values?
They're just different types, the same way the Number 0
and the BigInt 0n
are different types. The spec has a third kind of numeric value, "mathematical values", which it generally uses internally and then converts to Number or BigInt values when they get exposed to code. That is, when the spec talks about the length of an empty list being zero, that means the actual concept of zero, not the floating-point number 0
; same deal here.
(When dealing with the two infinities we say "extended mathematical values", since those extra two points are not real numbers.)
There's some description in this section.
These are Number values, not mathematical values.