floating point subtraction in python [duplicate]
问题 This question already has answers here : Is floating point math broken? (31 answers) Closed 3 years ago . I'm trying to subtract to floating point numbers in python. I've values a = 1460356156116843.000000, b = 2301.93138123 When I try to print a-b , it's resulting the value 1460356156114541.000000 contrary to the actual value 1460356156114541.06861877 . What are the limitations in python while doing floating point arithmetic. Is there any way in python through which I can get the actual