On Mon, Mar 23, 2015 at 8:38 PM, Emile van Sebille <[email protected]> wrote:
> On 3/23/2015 5:52 AM, Steven D'Aprano wrote:
>
> Are there any other, possibly better, ways to calculate the fractional
>> part
>> of a number?
>>
>
> float (("%6.3f" % x)[-4:])
In general you lose a lot of precision this way...
-- https://mail.python.org/mailman/listinfo/python-list
