summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-09-22 11:39:25 +0200
committerChristian Grothoff <christian@grothoff.org>2021-09-22 11:39:25 +0200
commit81d9255872ce90c057b01ef2a15a9aa9b27c4fe1 (patch)
tree7ccf26888d38fb380d1df6e544888b8c2393f18c
parent7bf37b7ea24929c277cd915de3eac24e728a6a1f (diff)
NSE: return NaN (see #7021)
-rw-r--r--src/nse/gnunet-service-nse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nse/gnunet-service-nse.c b/src/nse/gnunet-service-nse.c
index 45ebae34c..972b3a79d 100644
--- a/src/nse/gnunet-service-nse.c
+++ b/src/nse/gnunet-service-nse.c
@@ -390,7 +390,7 @@ setup_estimate_message (struct GNUNET_NSE_ClientMessage *em)
if (variance >= 0)
std_dev = sqrt (variance);
else
- std_dev = 1.0 / 0.0; /* return infinity due to estimate_count == 0 */
+ std_dev = variance; /* return NaN (due to estimate_count == 0 causing 0.0/0.0) */
current_std_dev = std_dev;
current_size_estimate = mean;