Re: use decimal

2008-09-22 Thread Waldemar Horwat
Mark S. Miller wrote: In both cases, it would seem that new numeric types must still be added by the language's providers rather than the language's users. This is the tragic constraint that none of the present proposals have been able to escape. I would much rather see us work on that

Re: use decimal

2008-09-19 Thread Mike Cowlishaw
Mark S. Miller [EMAIL PROTECTED] wrote: On Thu, Sep 18, 2008 at 4:52 PM, Brendan Eich [EMAIL PROTECTED] wrote: -0 and 0 are not the same given floating point number. 1/-0 vs. 1/ 0 and Math.atan2(-0,0) vs. 0,0 are but two examples. Yes, I understand their operational difference. Whether

Re: use decimal

2008-09-18 Thread Sam Ruby
On Wed, Sep 17, 2008 at 10:52 PM, Brendan Eich [EMAIL PROTECTED] wrote: On Sep 17, 2008, at 7:48 PM, Sam Ruby wrote: Anybody care to mark up what they would like to see the following look like? http://intertwingly.net/stories/2008/09/12/estest.html Shipt it! :-) (Not in ES3.1,

Re: use decimal

2008-09-18 Thread Sam Ruby
2008/9/17 Mark S. Miller [EMAIL PROTECTED]: If that is the case then 1.5m / 10.0 != 1.5 / 10.0, and thus it seems wrong for 1.5m and 1.5 to be '==='. 0/-0 != 0/0. Does it thus seem wrong that -0 === 0? Just so that I'm clear what you point is, It is worth noting that 42/0 != 42/0, yet

Re: use decimal

2008-09-18 Thread Mark S. Miller
On Wed, Sep 17, 2008 at 10:53 PM, Maciej Stachowiak [EMAIL PROTECTED] wrote: I think it is a tenable position that 1.5m === 1.5000m based on the cohort concept, since performing the same operation on both will give answers that are in the same cohort equivalence class. But 1.5 / 10.0 != 1.5m

Re: use decimal

2008-09-18 Thread Mark S. Miller
On Thu, Sep 18, 2008 at 7:54 AM, Sam Ruby [EMAIL PROTECTED] wrote: 2008/9/17 Mark S. Miller [EMAIL PROTECTED]: If that is the case then 1.5m / 10.0 != 1.5 / 10.0, and thus it seems wrong for 1.5m and 1.5 to be '==='. 0/-0 != 0/0. Does it thus seem wrong that -0 === 0? Just so that

Re: use decimal

2008-09-18 Thread Mark S. Miller
On Thu, Sep 18, 2008 at 8:00 AM, Mike Cowlishaw [EMAIL PROTECTED] wrote: Are -0 and 0 in the same cohort? In IEEE 754, no: *2.1.10 cohort: *The set of all floating-point representations that represent a given floating-point number in a given floating-point format. In this context

Re: use decimal

2008-09-18 Thread Mark S. Miller
On Thu, Sep 18, 2008 at 4:52 PM, Brendan Eich [EMAIL PROTECTED] wrote: -0 and 0 are not the same given floating point number. 1/-0 vs. 1/0 and Math.atan2(-0,0) vs. 0,0 are but two examples. Yes, I understand their operational difference. Whether that difference means they are not the same

Re: use decimal

2008-09-18 Thread Maciej Stachowiak
On Sep 18, 2008, at 5:13 PM, Mark S. Miller wrote: On Thu, Sep 18, 2008 at 4:52 PM, Brendan Eich [EMAIL PROTECTED] wrote: -0 and 0 are not the same given floating point number. 1/-0 vs. 1/0 and Math.atan2(-0,0) vs. 0,0 are but two examples. Yes, I understand their operational difference.

Re: use decimal

2008-09-18 Thread David-Sarah Hopwood
Mark S. Miller wrote: Long long ago I actually had read that document carefully, and I had also looked at I think the [Brown 1981] which it cites. (But the doc has no bibliography. Anyone have a pointer?) My memory of the theory of floating point is that the numbers are exact but the

Re: use decimal

2008-09-18 Thread Maciej Stachowiak
On Sep 18, 2008, at 6:03 PM, Mark S. Miller wrote: On Thu, Sep 18, 2008 at 5:22 PM, Maciej Stachowiak [EMAIL PROTECTED] wrote: On Sep 18, 2008, at 5:13 PM, Mark S. Miller wrote: On Thu, Sep 18, 2008 at 4:52 PM, Brendan Eich [EMAIL PROTECTED] wrote: -0 and 0 are not the same given

Re: use decimal

2008-09-17 Thread Brendan Eich
not be 'number'. I disagree with #1 and thus #3. Here is what I wrote: Without use decimal, typeof 1.1m must not be number to preserve this same invariant [that a === b = typeof a == typeof b a == b]. Otherwise (without use decimal) 1.5m == 1.5 but 1.1m != 1.1, so without making typeof 1.5m

Re: use decimal

2008-09-17 Thread Brendan Eich
On Sep 17, 2008, at 7:48 PM, Sam Ruby wrote: Anybody care to mark up what they would like to see the following look like? http://intertwingly.net/stories/2008/09/12/estest.html Shipt it! (Not in ES3.1, certainly in Firefox 3.1 if we can... :-) /be

Re: use decimal

2008-09-17 Thread Maciej Stachowiak
On Sep 17, 2008, at 10:06 PM, Mark S. Miller wrote: 0/-0 != 0/0. Does it thus seem wrong that -0 === 0? Well, yes, actually it does seem wrong to me, but we all accept that particular wrongness. This is just more of the same. A lot more. Two wrongs don't make a right. One exception