Please read OSS note 122471 - Conversion of unit of measure for goods movements
it explains the mathematical background to rounding issues and has as well a recommendation, which is some hundred times made here in the forum too in other discussions about rounding issues: make sure your base unit is the smallest unit.