From fef6a3eb8b34c88ba7a9a274844969baee899f15 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Fri, 26 Mar 2021 00:11:16 +0100 Subject: we have fixed decimal places, not fixed precision --- core/api-common.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/api-common.rst') 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 ``:``. -Taler treats monetary amounts as fixed-precision numbers. Unlike floating point numbers, +Amounts of currency are serialized as a string of the format +``:``. 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. -- cgit v1.2.3