Calculation of fractional parts and decimals