Bruno Jouhier (2017-08-04T15:42:11.000Z)
BigDecimal is a MUST for accounting.

Main reasons:

   - JS number precision is too limited (16 digits)
   - Decimal numbers are not represented "exactly" by JS numbers =>
   comparisons gives surprising results (0.1 + 0.2 !== 0.3).
   - Incorrect roundtrips with SQL Databases: decimals have up to 38 digits
   precision in Oracle and SQL Server, 65 (!!) in MySQL.

JSON serialization is addressed by serializing to string. Like dates (no
date literals in JS/JSON).

Same for SQL. In the absence of a BigDecimal type on JS side, values are
passed as strings.

Bruno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170804/ba405979/attachment.html>
bjouhier at gmail.com (2017-08-04T16:32:35.157Z)
BigDecimal is a MUST for accounting.

Main reasons:

   - JS number precision is too limited (16 digits)
   - Decimal numbers are not represented "exactly" by JS numbers =>
   comparisons gives surprising results (0.1 + 0.2 !== 0.3).
   - Lossy roundtrips with SQL Databases: decimals have up to 38 digits
   precision in Oracle and SQL Server, 65 (!!) in MySQL.

JSON serialization is addressed by serializing to string. Like dates (no
date literals in JS/JSON).

Same for SQL. In the absence of a BigDecimal type on JS side, values are
passed as strings.

Bruno