summaryrefslogtreecommitdiffhomepage
path: root/qfunctionconfigurator/functionconfig.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-07-26 11:27:28 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-07-26 11:27:28 +0200
commitfaced34f8133e3a2c0b1f571f0d7a9a64282b280 (patch)
treed60c69d6e8d3d59cd692484a3427f6de02b7fe0b /qfunctionconfigurator/functionconfig.h
parentde900bb1159af9f85d6f874925648844566363e3 (diff)
qfc: use doubles for intermediate values
We could lose precision when multiplying by integral_max with floats. For doubles, we can count on up to 2^56 - 1 to be expressible somewhat exactly.
Diffstat (limited to 'qfunctionconfigurator/functionconfig.h')
-rw-r--r--qfunctionconfigurator/functionconfig.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/qfunctionconfigurator/functionconfig.h b/qfunctionconfigurator/functionconfig.h
index 74e20cf0..d49a8f7b 100644
--- a/qfunctionconfigurator/functionconfig.h
+++ b/qfunctionconfigurator/functionconfig.h
@@ -20,7 +20,7 @@
class Map {
private:
static constexpr int value_count = 5000;
- using num = float;
+ using num = double;
using integral = std::uint16_t;
static constexpr integral integral_max = std::numeric_limits<integral>::max();