You mustn't use "==" to check your answers because that doesn't allow for round-off errors. I checked the answers you obtained and they are correct to within reasonable round-off errors, which means they are correct out to about the fourteenth or fifteenth decimal place. Try using 'format long' to compare them. That is all you can reasonably expect from your computer using double precision floating point numbers.
In point of fact some of the theoretical values are fractions that cannot be represented exactly on either a decimal or a binary computing system, so it is not difficult to imagine that A*X and B may not be precisely the same. They actually differ only out in the least significant few bit positions.