You can round your number to e.g. 14 decimal places or less:
>>> round(4.999999999999997, 14) 5.0
PS: double precision is about 15 decimal places
You can round your number to e.g. 14 decimal places or less:
>>> round(4.999999999999997, 14) 5.0
PS: double precision is about 15 decimal places