With integer division on a U256, 2999999999999999875/386028708828325200000000 = 0, but I want 0.000007771442723. I know using floats with currency can cause problems with rounding, but I think the way I am trying to use it for display is okay. If not, please point me to a better way.
How can I get a float/decimal type out of dividing 2 U256s?
I have an order object from a 0x relay with these values that are too big for a f64 and I want to display the price.
With integer division on a U256,
2999999999999999875/386028708828325200000000 = 0
, but I want0.000007771442723
. I know using floats with currency can cause problems with rounding, but I think the way I am trying to use it for display is okay. If not, please point me to a better way.