Skip to content

Commit 3b9e7c4

Browse files
committed
Add even more updates
1 parent b920e41 commit 3b9e7c4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ console.log(amountInEur.round(2).toString());
7777
We propose a `Decimal.Amount` object to store a Decimal value together with precision information. This is especially useful in formatting Decimal values, especially in internationalization and localization contexts.
7878

7979
```js
80-
let a = new Decimal.Amount("1.90", 4, "fractionalDigits");
80+
let a = new Decimal.Amount("1.90", 4); // 4 fractional digits
8181
const formatter = new Intl.NumberFormat("de-DE");
8282
formatter.format(a); // "1,9000"
8383
```
@@ -191,7 +191,7 @@ Based on feedback from JS developers, engine implementors, and the members of th
191191

192192
We will use the **Decimal128** data model for JavaScript decimals. Decimal128 is not a new standard; it was added to the IEEE 754 floating-point arithmetic standard in 2008. It represents the culmination of decades of research, both theoretical and practical, on decimal floating-point numbers. Values in the Decimal128 universe take up 128 bits. In this representation, up to 34 significant digits (that is, decimal digits) can be stored, with an exponent (power of ten) of +/- 6143.
193193

194-
In addition to proposing a new `Decimal` class, we propose a `Decimal.Amount` class for storing a Decimal number together with a precision (i.e., number of significant digits). The second class is important for string formatting purposes, where one desires to have a notion of a number that “knows” how precise it is.
194+
In addition to proposing a new `Decimal` class, we propose a `Decimal.Amount` class for storing a Decimal number together with a precision (i.e., number of significant digits). The second class is important mainly for string formatting purposes, where one desires to have a notion of a number that “knows” how precise it is. The `Decimal.Amount` class also helps with data exchange, in cases where one needs to preserve all digits—including any trailing zeroes—in a digit string coming over the wire. That is, the `Decimal.Amount` class contains more information that a mathematical value.
195195

196196
### Known alternatives
197197

0 commit comments

Comments
 (0)