summaryrefslogtreecommitdiff
path: root/core/api-common.rst
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-03-26 00:11:16 +0100
committerFlorian Dold <florian@dold.me>2021-03-26 00:17:56 +0100
commitfef6a3eb8b34c88ba7a9a274844969baee899f15 (patch)
tree143765ae9912918ad91e46bb8c83b2c66d1a8cbf /core/api-common.rst
parent5d3ab4eba372d2372c43e5d83b34824b701e5c43 (diff)
downloaddocs-fef6a3eb8b34c88ba7a9a274844969baee899f15.tar.gz
docs-fef6a3eb8b34c88ba7a9a274844969baee899f15.tar.bz2
docs-fef6a3eb8b34c88ba7a9a274844969baee899f15.zip
we have fixed decimal places, not fixed precision
Diffstat (limited to 'core/api-common.rst')
-rw-r--r--core/api-common.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/api-common.rst b/core/api-common.rst
index cecaf95b..19f6bf55 100644
--- 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.