commit fef6a3eb8b34c88ba7a9a274844969baee899f15
parent 5d3ab4eba372d2372c43e5d83b34824b701e5c43
Author: Florian Dold <florian@dold.me>
Date: Fri, 26 Mar 2021 00:11:16 +0100
we have fixed decimal places, not fixed precision
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/core/api-common.rst b/core/api-common.rst
@@ -381,8 +381,9 @@ Amounts
type Amount = string;
-Amounts of currency are serialized as a string of the format ``<Currency>:<DecimalAmount>``.
-Taler treats monetary amounts as fixed-precision numbers. Unlike floating point numbers,
+Amounts of currency are serialized as a string of the format
+``<Currency>:<DecimalAmount>``. Taler treats monetary amounts as
+fixed-precision numbers, with 8 decimal places. Unlike floating point numbers,
this allows accurate representation of monetary amounts.
The following constrains apply for a valid amount:
@@ -396,7 +397,6 @@ The following constrains apply for a valid amount:
"EUR:1.50" and "EUR:10" are valid amounts. These are all invalid amounts: "A:B:1.5", "EUR:4503599627370501.0", "EUR:1.", "EUR:.1".
-
An amount that is prefixed with a ``+`` or ``-`` character is also used in certain contexts.
When no sign is present, the amount is assumed to be positive.