There are conversion methods in the set of libraries you're using, see:
But precision can always be lost when coercing from a larger number of bits to a smaller number of bits. There is no way to represent the same precision with less bits.
Apart from the precision loss, converting 0.833333 to an integer will still give you either 0 or 1 depending on whether you round or truncate.
A better alternative would be reordering the operations such that you never need to represent non-integer numbers. For example if the division is followed by a multiplication then do the multiplication before the division.