aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dht/gnunet-service-dht.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dht/gnunet-service-dht.c b/src/dht/gnunet-service-dht.c
index 52d51ecb9..66facaa53 100644
--- a/src/dht/gnunet-service-dht.c
+++ b/src/dht/gnunet-service-dht.c
@@ -2731,11 +2731,11 @@ converge_distance (const GNUNET_HashCode *target,
2731 return 1; 2731 return 1;
2732 } 2732 }
2733 2733
2734 /* Take the log (base 2) of the number of bits matching the other peer */ 2734 /* Take the log (base e) of the number of bits matching the other peer */
2735 exponent = log2(other_matching_bits); 2735 exponent = log(other_matching_bits);
2736 2736
2737 /* Check if we would overflow; our largest possible value is 2^64 */ 2737 /* Check if we would overflow; our largest possible value is 2^64 = e^44.361419555836498 */
2738 if (exponent * calc_value >= 64) 2738 if (exponent * calc_value >= 44.361419555836498)
2739 return ULLONG_MAX; 2739 return ULLONG_MAX;
2740 2740
2741 /* Clear errno and all math exceptions */ 2741 /* Clear errno and all math exceptions */