https://developers.google.com/web/updates/2018/05/bigint
IBM has had a solution for a long time: http://speleotrove.com/decimal/
Python uses it: https://docs.python.org/3.5/library/decimal.html
Get a proper decimal library, and then you can devote brain cells to actual problems. The IBM link above includes links to libraries that do it right.
https://developers.google.com/web/updates/2018/05/bigint