I'm trying to convert an Ethereum value to its retrospective fiat value. The final value of USD seems wrong, and I wonder if it's how it's calculated with big numbers.
I've attached a sandbox for convenience. https://codesandbox.io/s/autumn-sun-0k02d5?file=/src/index.js
Attempt
const one = parseUnits("1");
const price = parseUnits("0.1");
const _rate = "1563.48";
const rate = parseUnits(_rate, 2);
const usdPrice = price.lt(one) ? rate.mul(price) : rate.div(price);
Expectation: usdPrice = 156.348
Actual: usdPrice = 15634.8