From f9aaf86f28e41fdbc6fd2b8f100802e9b2f934bd Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Wed, 18 Dec 2024 15:48:06 +0000 Subject: [PATCH] alt consts --- lightning/src/routing/scoring.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lightning/src/routing/scoring.rs b/lightning/src/routing/scoring.rs index c81a27e898c..3ba5882036b 100644 --- a/lightning/src/routing/scoring.rs +++ b/lightning/src/routing/scoring.rs @@ -1186,7 +1186,7 @@ fn success_probability( // multiple), as it will come out in the division of num / den. let (max_norm, amt_norm, min_norm) = (max - 0.5, amount - 0.5, min - 0.5); let (max_pow, amt_pow, min_pow) = three_f64_pow_9(max_norm, amt_norm, min_norm); - let (max_v, amt_v, min_v) = (max_pow + max_norm / 256.0, amt_pow + amt_norm / 256.0, min_pow + min_norm / 256.0); + let (max_v, amt_v, min_v) = (max_pow + max_norm / 100.0, amt_pow + amt_norm / 100.0, min_pow + min_norm / 100.0); let num = max_v - amt_v; let den = max_v - min_v; @@ -1207,7 +1207,7 @@ fn success_probability( // Note that we prefer to increase the denominator rather than decrease the numerator as // the denominator is more likely to be larger and thus provide greater precision. This is // mostly an overoptimization but makes a large difference in tests. - denominator = denominator * 81 / 64 + denominator = denominator * 77 / 64 } (numerator, denominator)