top | item 38954835

(no title)

v8xi | 2 years ago

Was curious what chatGPT would say:

The result of subtracting 9999999999999998.0 from 9999999999999999.0 is 2.0. This result is due to the limitations in the precision of floating-point arithmetic in computers. When dealing with very large numbers, the precision can be lost, leading to such unexpected results.

I suppose this must be in its training set.

discuss

order

mef|2 years ago

these days it looks like ChatGPT generates and runs code behind the scenes for math questions (it used to be pretty bad at these kinds of math questions. you can click the little "view analysis" button to see the code it's running.

when I ask about this question it generates and runs Python behind the scenes, thus the incorrect answer.

lo_zamoyski|2 years ago

Although it offers an explanation, which is something it could not do by just evaluating the expression. So the explanation is in its training set. And given that this is an understood flaw or limitation, it is possible it didn't even need to run any code.

dist-epoch|2 years ago

Hmm, I asked Bing Chat in Precise mode and got the correct answer:

Q: What is the result of subtracting 9999999999999998.0 from 9999999999999999.0

A: The result of subtracting 9999999999999998.0 from 9999999999999999.0 is 1.0. Here is the calculation: 9999999999999999.0−9999999999999998.0=1.0

I also tried a variation and it's still correct, maybe it's using a calculator plugin:

Q: What is the result of 1239995999999999.0 - 1239995999999998.0

A: The result of the subtraction operation 1239995999999999.0−1239995999999998.0 is 1.0

GaggiX|2 years ago

Just asking for the subtraction it just gives me 1.0, what did you ask?