Re: more numeric constants please (especially EPSILON)

2013-07-09 Thread Jorge Chamorro
On 10/07/2013, at 03:49, Mark S. Miller wrote: > I initially didn't think this mattered, but it is an excellent and important > point. Look at the use I make of Nat in Dr.SES in Figure 1 of > : > > var makeMint = () => { > var m = WeakMap(); >

Re: more numeric constants please (especially EPSILON)

2013-07-09 Thread Jeff Walden
On 07/09/2013 04:14 PM, Brendan Eich wrote: >> Why pick this particular epsilon? Why not, say, 2**-1074 instead, as the >> difference between 0 and the next largest number? Seeing only the name I'd >> have guessed 2**-1074. > > See http://en.wikipedia.org/wiki/Machine_epsilon. Hmm, my memory

Re: more numeric constants please (especially EPSILON)

2013-07-09 Thread Brendan Eich
Jorge Chamorro wrote: On 10/07/2013, at 03:23, Brendan Eich wrote: Mark S. Miller wrote: FWIW, we include 2**53 as in the "contiguous range of exactly representable natural numbers". https://code.google.com/p/google-caja/source/browse/trunk/src/com/google/caja/ses/startSES.js#492 It's exactl

Re: more numeric constants please (especially EPSILON)

2013-07-09 Thread Jorge Chamorro
On 10/07/2013, at 03:23, Brendan Eich wrote: > Mark S. Miller wrote: >> FWIW, we include 2**53 as in the "contiguous range of exactly representable >> natural numbers". >> >> https://code.google.com/p/google-caja/source/browse/trunk/src/com/google/caja/ses/startSES.js#492 > > It's exactly repres

Re: more numeric constants please (especially EPSILON)

2013-07-09 Thread Brendan Eich
Mark S. Miller wrote: FWIW, we include 2**53 as in the "contiguous range of exactly representable natural numbers". https://code.google.com/p/google-caja/source/browse/trunk/src/com/google/caja/ses/startSES.js#492 It's exactly representable, but its representation is not exact. If that makes

Re: more numeric constants please (especially EPSILON)

2013-07-09 Thread Jorge Chamorro
On 10/07/2013, at 02:34, Allen Wirfs-Brock wrote: > > On Jul 9, 2013, at 4:14 PM, Brendan Eich wrote: > >> Jeff Walden wrote: >>> ... >> Number.MAX_INTEGER == 2^53 - 1 The maximum integer value that can be stored in a number without losing precision. (OK, so technically 2^

Re: more numeric constants please (especially EPSILON)

2013-07-09 Thread Brendan Eich
Allen Wirfs-Brock wrote: Isn't the anomaly (and the issue) that 2^53 (9,007,199,254,740,992) is both the upper-end of the range of integers that can be exactly represented in IEEE float64, it is is also the representation of the smallest positive integer (2^53+1) that cannot be exactly represe

Re: more numeric constants please (especially EPSILON)

2013-07-09 Thread Allen Wirfs-Brock
On Jul 9, 2013, at 4:14 PM, Brendan Eich wrote: > Jeff Walden wrote: >> ... > >>> Number.MAX_INTEGER == 2^53 - 1 >>> The maximum integer value that can be stored in a number without losing >>> precision. >>> (OK, so technically 2^53 can be stored, but that's an anomaly.) >> >> Why discount the

Re: more numeric constants please (especially EPSILON)

2013-07-09 Thread Brendan Eich
Jeff Walden wrote: I'm only commenting on the proposals that seem to be in the current draft, because I'm reviewing a patch that adds only those particular constants. :-) Just to be clear why I'm saying nothing about the other constants, neither to praise nor to disparage. On 03/09/2012 08:

Re: May 4 ES6 draft is available

2013-07-09 Thread Jeff Walden
On 05/07/2012 01:31 PM, Allen Wirfs-Brock wrote: > added Number.EPSILON,MAX_INTEGER,parseInt, parseFloat,isNaN,isFinite, > isInteger, toInt Modulo the semantic quirks in my last response, talking about the values and intended meanings of EPSILON and MAX_INTEGER, I think it would be better to

Re: more numeric constants please (especially EPSILON)

2013-07-09 Thread Jeff Walden
I'm only commenting on the proposals that seem to be in the current draft, because I'm reviewing a patch that adds only those particular constants. :-) Just to be clear why I'm saying nothing about the other constants, neither to praise nor to disparage. On 03/09/2012 08:00 PM, Roger Andrews