In Python, I am adding float numbers.
I have numbers
client_balance = 40360.7416622703
fund_manager_balance = 676.600516394647
uits= 6.72791159564433
here is my python code
def update_client_balance(self, record):
if record.client_id.account_name != ACCOUNT_MANAGER_NAME:
self.client_balance += record.units
def update_manager_balance(self, record):
if record.client_id.account_name == ACCOUNT_MANAGER_NAME:
self.fund_manager_balance += record.units
After execution of these functions I have
client_balance = 40360.7416622703
fund_manager_balance = 683.328427990291
Now I want to validate the result of these functions manually
so (client_balance + fund_manager_balance)(before function execution) -uits - (client_balance + fund_manager_balance)(after function execution)
By Value
40360.7416622703 + 676.600516394647 + 6.72791159564433 - (40360.7416622703 + 683.328427990291) = -0.00000000000727595761418343
It should give me Zero value but it's giving me -0.00000000000727595761418343
Please help me how I can solve this?