Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
alt consts
Browse files Browse the repository at this point in the history
TheBlueMatt committed Dec 18, 2024
1 parent 1945337 commit f9aaf86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lightning/src/routing/scoring.rs
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit f9aaf86

Please sign in to comment.