mirror of
https://git.gfz-potsdam.de/naaice/poet.git
synced 2025-12-15 20:38:23 +01:00
Merge branch 'fix-rounding' into 'main'
fix: remove rounding to significant digit +1 See merge request sec34/port!16
This commit is contained in:
commit
c9859aa206
@ -37,7 +37,7 @@ using namespace std;
|
||||
|
||||
inline DHT_Keyelement round_key_element(double value, std::uint32_t signif) {
|
||||
std::int8_t exp = (std::int8_t)std::floor(std::log10(std::fabs(value)));
|
||||
std::int64_t significant = value * std::pow(10, signif - exp);
|
||||
std::int64_t significant = value * std::pow(10, signif - exp - 1);
|
||||
|
||||
DHT_Keyelement elem;
|
||||
elem.exp = exp;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user