In Admin-> Configuration-> Stock, you can set the decimal place so the cart accepts only a certain number of decimals when entering quantities.