tc39 / proposal-decimal

Built-in exact decimal numbers for JavaScript
http://tc39.es/proposal-decimal/
497 stars 18 forks source link

Fix most known bugs, including separation of selection of quantum from rounding, as well as API additions #159

Closed jessealama closed 4 months ago

jessealama commented 4 months ago

As suggested in #122

jessealama commented 4 months ago

There's one known unknown here: the selection of the quantum for division.

The reference implementation follows the calculation of the quantum as given in Mike Cowlishaw's General Decimal Arithmetic Specification. I know that that's not official spec text but I've found it to be a useful companion document. IEEE 754-2019 does specify the desired quantum, and that's what's present here in this spec text.