jessealama / decimal128

JavaScript userland partial implementation of IEEE 754 Decimal128 decimal floating-point arithmetic
BSD 2-Clause "Simplified" License
19 stars 8 forks source link

Allow arbitrary number of digits when constructing a Decimal128 value #7

Closed jessealama closed 1 year ago

jessealama commented 1 year ago

Decimal128 allows at most 34 significant digits. If we are given a digit string that contains more than 34 significant digits, simply truncate the digits after the 34th significant digit. Don't throw an error; at most, emit a log message.