Suppose I have the following code:
0.7 / 100
I would expect to get 0.007 but instead I am getting 0.006999999. I know this is a float precision error but how do I get the expected value?
I tried:
Decimal(0.7 / 100)
Decimal(0.7)/int(100)
But can’t seem to get it to work. Tried searching but can’t seem to phrase it right to get a good result.