# Is WolframAlpha doing Math wrong?

I just tried to solve the following equation with WolframAlpha and got some very weird results:

\sum_{i=1}^{x}x^2*i = 318338237039211050000

1. WolframAlpha tells me, one of the real solutions is x = 158847.000000000;

2. It also tells me that (of course) 158847.000000000 = 158847;

3. WA then tells me, that the equation using x=158847.000000000 is true;

4. But the same equation using x=158847 is false.

Shouldn't be 3) and 4) both true? Can anyone explain these results to me?

This is the nature of comparisons for floating point equality. For example, there is no fixed precision decimal representation for 1/3 such that (3 * 1/3) = 1 is true. And you can make (2/3 + 1/3) = 1 be true or (1/3 + 1/3) = 2/3 be true but not both. See What Every Computer Scientist Should Know About Floating Point.