Make scale fixed to 10^2.
Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/400d268b Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/400d268b Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/400d268b Branch: refs/heads/decimal-type Commit: 400d268b9d28e331707cc58094b9f0decc415d5c Parents: d71599f Author: Hakan Memisoglu <hakanmemiso...@apache.org> Authored: Wed Jun 15 13:16:18 2016 -0500 Committer: Hakan Memisoglu <hakanmemiso...@apache.org> Committed: Wed Jun 15 14:46:25 2016 -0500 ---------------------------------------------------------------------- types/DecimalLit.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/400d268b/types/DecimalLit.hpp ---------------------------------------------------------------------- diff --git a/types/DecimalLit.hpp b/types/DecimalLit.hpp index a9f3825..d1e2255 100644 --- a/types/DecimalLit.hpp +++ b/types/DecimalLit.hpp @@ -43,9 +43,9 @@ struct DecimalLit { data_type data_; - static constexpr std::uint64_t kPrecisionWidth = 4; + static constexpr std::int64_t kPrecisionWidth = 2; - static constexpr std::int64_t kMaxFractionInt = 10000; + static constexpr std::int64_t kMaxFractionInt = 100; inline std::uint64_t getFractionalPart() const { return static_cast<std::uint64_t>(static_cast<std::uint64_t>(std::abs(data_)) % kMaxFractionInt);