I only have access to the current discounted price, and it’s discount percentage (integer). I’m trying to calculate it’s base price as well on the fly for my own records.
However, I feel compelled to note that you should not be using floats for anything dealing with currency because they can be very imprecise in certain scenarios. Instead you should be using a library like ex_money
Yeah I would use something like that for more complicated scenarios. In this case the number is a simple display, not really meant to intense calculations or really any calculations.