My goal is to accurantly add or remove 0.05% from values with 18 decimals in Python without converting them to floats. I made the two following solutions and they seem correct for me, but I am very unfamiliar with numbers in Python, therefore I would like to know if there's a better (in terms of accurancy) solution.
price_in_wei = 1000000000000000000 # = 1
# -0.05%
price_with_fee = (price_in_wei/1000)*995
# +0.05%
price_with_fee = (price_in_wei/1000)*1005
# -0.05%
price_with_fee = (price_in_wei*995)/1000
# +0.05%
price_with_fee = (price_in_wei*1005)/1000