diff options
author | John Wiegley <johnw@newartisans.com> | 2008-11-23 19:15:32 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-11-23 19:15:32 -0400 |
commit | c172281858a2e2cd9c708e7dbc828b74c16eabc8 (patch) | |
tree | 4afbaf4359a29d43d5ca7b830d11767590e1cff1 /src/amount.h | |
parent | 7ce1c4e5a980f7653fc11be48c6046fb8b2bff50 (diff) | |
download | fork-ledger-c172281858a2e2cd9c708e7dbc828b74c16eabc8.tar.gz fork-ledger-c172281858a2e2cd9c708e7dbc828b74c16eabc8.tar.bz2 fork-ledger-c172281858a2e2cd9c708e7dbc828b74c16eabc8.zip |
Abstracted precision extension constant, and added a note that precision must
be handled differently, since paying attention to places after the decimal is
not enough.
Diffstat (limited to 'src/amount.h')
-rw-r--r-- | src/amount.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/amount.h b/src/amount.h index c6d2c27c..62a4a74b 100644 --- a/src/amount.h +++ b/src/amount.h @@ -101,6 +101,12 @@ public: typedef uint_least16_t precision_t; /** + * The number of places of precision by which values are extended to + * avoid losing precision during division and multiplication. + */ + static const unsigned int extend_by_digits = 8U; + + /** * The current_pool is a static variable indicating which commodity * pool should be used. */ |