The 20.1.2.1 Number.EPSILON says:
The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1 that is representable as a Number value
The definition is incorrect since in that case we end up with negative value for constant. I propose to make an amendment to definition like:
The value of Number.EPSILON is the absolute difference between 1 and the smallest value greater than 1 that is representable as a Number value
We could also just define it as 2^-52 (hopefully in hex form though), since we know we're using binary64.
I'm confused, how do we end up with a negative value? The prose here doesn't, to me, read as "subtract
@ljharb i do distinctly recall from math class that "the difference of x and y" is x minus y, which would result in a negative value here. that being said, i think it is easy to read it in either way, so i would be in favor of rewording it.
Echoing @ljharb, the power really is in the preposition鈥擾between_ is symmetric, _of_ and _from_ are not. The image of "difference between X and Y" should be "distance between X and Y on the real line", but if this isn't clear then I suppose we should find a phrasing that doesn't use the word 'difference'. 馃槙
I'd be open to rephrasing it, sure. How about something like:
The value of Number.EPSILON is _x_ - 1, where _x_ is the smallest value greater than 1 that is representable as a Number value