3 ms·
JS is already very popular in finance, decimal types aren’t always needed for monetary values, floats are often fine (or computations can be done on the backend
by carnitine 5y ago
JS is already very popular in finance, decimal types aren’t always needed for monetary values, floats are often fine (or computations can be done on the backend).
- bluepizza 5y agoWe usually store the values as longs and apply the decimal marker only when showing to the user. Floats are fine when it's just long to float. But any operation between two floats is a mistake.
- carnitine 5y agoNot for financial modelling which is the bulk of work in the front office. Everything is calculated as floats for performance reasons, no model is accurate enough for floating point error to matter.
- dlojudice 5y ago> or computations can be done on the backend what if your backend is nodejs? decimals for JS are mainly needed on backend