Easy, either implement a decimal type (4 fractional digits) as most programming languages have them implemented by users.
or multiply by 10000 then do your calculation and then divide by 10000 again.
I used a decimal type for the administration program I coded.