Es-discuss - several decimal discussions

Sam Ruby rubys at intertwingly.net
Mon Aug 25 03:20:56 PDT 2008


On Mon, Aug 25, 2008 at 12:47 AM, Mark S. Miller <erights at google.com> wrote:
> On Sun, Aug 24, 2008 at 8:09 PM, Sam Ruby <rubys at intertwingly.net> wrote:
>> As to what the what the value of 1.0m == 1.00m should be, the amount
>> of code and the amount of spec writing effort is the same either way.
>> I can see arguments both ways.  But if it were up to me, the
>> tiebreaker would be what the value of typeof(1.1m) is.  If "number",
>> the scale tips slightly towards the answer being false.  If "object",
>> then then scale is firmly on the side of the answer being true.
>>
>> All things considered, I would argue for false.

Typo in the above: I meant ===

> On Sun, Aug 24, 2008 at 8:40 PM, Sam Ruby <rubys at intertwingly.net> wrote:
>> On Sun, Aug 24, 2008 at 11:15 PM, Mark S. Miller <erights at google.com> wrote:
>>> On Sun, Aug 24, 2008 at 8:09 PM, Sam Ruby <rubys at intertwingly.net> wrote:
>>>> All things considered, I would argue for false.
>>>
>>> I'm curious. If 1.0m == 1.00m were false, what about 1.0m < 1.00m and
>>> 1.0m > 1.00m?
>>
>> 1.0m == 1.00m should be true.
>
> I'm confused. All things considered, what do you think 1.0m == 1.00m should be?

true

> --
>    Cheers,
>    --MarkM

- Sam Ruby


More information about the Es-discuss mailing list