JavaScript numbers are 64-bit floats: exact only up to 2^53-1. Token amounts in wei exceed that, so use BigInt (`123n`) for on-chain values and format only for display.
const wei = 1_500000000000000000n; const display = Number(wei / 10n ** 15n) / 1000; // 1.5
Never mix BigInt and Number in arithmetic — that throws. Convert deliberately at the display boundary.