4 ms·
Go type .1*.2 into any JavaScript console. Edit: slapping a few more in here: https://learn.microsoft.com/en-us/office/troubleshoot/excel/floating-point-arith
by lolsowrong 4y ago
Go type .1*.2 into any JavaScript console.
Edit: slapping a few more in here:
https://learn.microsoft.com/en-us/office/troubleshoot/excel/floating-point-arithmetic-inaccurate-result https://learn.microsoft.com/en-us/office/troubleshoot/excel/...
https://daviddeley.com/pentbug/index.htm https://daviddeley.com/pentbug/index.htm
- tricksforfree 4y agoOne deck is made of wood. One deck is made made of steel. They will behave differently after years of weathering. Just because they are both both decks doesn't mean they are the same.
- lolsowrong 4y agoAre both useful in some context?
- Wowfunhappy 4y agoThe answer in the Javascript console is still a correct answer. The user did not specify a level of precision, and web browsers are programmed to use a precision level which is reasonable under most circumstances. If the user needs a higher level of precision, he or she needs to specify that as part of the question (such as by not using floating point numbers). I don't mean to be pedantic. I teach coding to elementary school students, and this is something fundamental I try to make them understand. A computer will always do what you tell it to do. A bug is when you accidentally tell a computer to do something different than what you'd intended. Going back to the calculator example, if a student used a calculator and got the wrong answer, the problem didn't come from the calculator. This is useful to understand; it can help the student work backwards to figure out what did go wrong. AI is different in that we've instructed the computer to develop and follow its own instructions. When ChatGPT gives the wrong answer, it is in fact giving the right answer according to the instructions it was instructed to write for itself. With this many layers of abstraction, however, the maxim that computers "always do what you tell them" is no longer useful. No human truly knows what the computer is trying to do.
- bradjohnson 4y ago>The answer in the Javascript console is still a correct answer. It's wrong in the same way that saying 1/1 = 1.0004 is wrong. It's not a matter of chosen precision in that it doesn't make the answer correct when you increase the number of zeros between 1 and 4.
- lanstin 4y agoIt makes it less wrong. For most calculations people do we don’t that very many digits of precision for any one calculation.
- bradjohnson 4y agoThat's true. I think that it is analogous to the discussion of AI limitations. Both of these are tools and are not categorically exclusive. In the case of translation of floating point numbers from base-2 to base-10 we have to make approximations which will often be slightly wrong forever without regard for amount of precision. With AI, depending on the pre-conditions, the AI could be stuck in a state of being slightly wrong forever for a specific question without regard to further refinement of the query. These are both still useful as tools. We just need to be able to work on the amount of refinement of the answer that the AI gives, which may be able to be solved fairly well through prompt engineering, if not through the advancement of GPT itself.
- ModernMech 4y ago> I don't mean to be pedantic. I'm sorry in advance, but this reply is just to meet pedantry with pedantry. > A computer will always do what you tell it to do. This is the Bohr model of computers. It's the kind of thing you tell elementary school students because it's conceptually simple and mostly right, but I think we know better here on HN. Pedantically, computers don't always do what you tell them to, because the don't always hear what you tell them, and what you tell them can be corrupted even when they do hear it. For instance, random particles from outer space can cause a computer to behave quite randomly: https://www.thegamer.com/how-ionizing-particle-outer-space-helped-super-mario-64-speedrunner-save-time/ https://www.thegamer.com/how-ionizing-particle-outer-space-h... why was nobody able to pull it off, even when replicating exactly the inputs that DOTA_Teabag had used? Simple: this glitch requires a phenomenon known as a single-event upset, which is very much out of any player's control. I don't think we can reasonably say that in this instance, the computer behaved according to what the user told it to do. In fact, it responded to the user and the environment.