Mar-18-2019, 07:45 PM
Maybe multiply by 10, and just use the integer part of the float?
>>> x = 1.32 / 0.942 >>> x 1.4012738853503186 >>> import math >>> left = math.floor(x) >>> left 1 >>> x -= left >>> x 0.4012738853503186 >>> right = math.floor(x * 10) >>> left, right (1, 4)