Remix.run Logo
stavros 18 hours ago

Don't move the goalposts. The claim was:

> I've never seen a calculator come up with the wrong answer when adding two numbers.

1.00000001 + 1 doesn't equal 2, therefore the claim is false.

17 hours ago | parent | next [-]
[deleted]
samus 17 hours ago | parent | prev | next [-]

That's a known limitation of floating point numbers. Nothing buggy about that.

Muskwalker 14 hours ago | parent [-]

In fact in this case, it's not the known limitation of floating point numbers to blame: this Calculator application gives you the ability (submenu under View > Decimal Places) to choose a precision between 0 to 15 decimal places, and it will do rounding beyond that point. I think the default is 8.

The original screenshot shows a number with 13 decimal places, and if you set it at or above 13, then the calculation will come out correct.

The application doesn't really go out of its way to communicate this to the user. For the most part maybe it doesn't matter, but "user entering more decimal places than they'll get back" might be one thing an application might usefully highlight.

1718627440 15 hours ago | parent | prev | next [-]

1.00000001f + 1u does equal 2f.

wat10000 17 hours ago | parent | prev [-]

Sorry, but this annoys me. The claim might be false if I had made it after seeing your screenshot. But you don't know what I've seen in my life up to that point. The claim that all calculators are infallible would be false, but that's not the claim I made.

When a personal experience is cited, a valid counterargument would be "your experience is not representative," not "you are incorrect about your own experience."

stavros 14 hours ago | parent [-]

Well if you haven't seen enough calculators to see one that can't add, a very common issue with floating point arithmetic on computers, you shouldn't offer your experience as an argument for anything other than that you haven't seen enough calculators.

wat10000 12 hours ago | parent [-]

How many calculators do I need to have seen in order to make the claim that there are many calculators which are essentially 100% reliable?

Note that I am referring to actual physical calculators, not calculator apps on computers.

stavros 11 hours ago | parent [-]

Well, to make the claim you actually made, which is that you haven't seen a single calculator that was wrong, anywhere from zero to all of them. It's just that the "zero" end of that spectrum doesn't really tell us anything about calculators.