As with the AMM method in uniswap v2, when using x * y = K, 100 * 1000 = 100000. If you try to swap 0.001 at this time, 100000 / 100.001 = 999.990000099999 should come out, but 999.991 is output.

uint256 x = 10000000000000000000000;

uint256 y = 10000000000000000000000;

uint256 k = (x * y) * (10**18);

uint256 result_1 = k / (x + 001000000000000000);

uint256 result_2 = k %(x + 001000000000000000);

the result i want is

result_1 = 999

result_2 = 990000099999

However, the resulting value

result_1 = 999

result_2 = 991

Is there anyone who can solve this?