Skip to content

Commit 6ba04e8

Browse files
committed
f clearer math
1 parent c723a9d commit 6ba04e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning/src/routing/scoring.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1057,7 +1057,7 @@ fn success_probability(
10571057
let num = max_pow - (amount - 0.5).powi(3);
10581058
let den = max_pow - (min - 0.5).powi(3);
10591059

1060-
// Because our numerator and denominator max out at 2^-3 we need to multiply them by
1060+
// Because our numerator and denominator max out at 0.5^3 we need to multiply them by
10611061
// quite a large factor to get something useful (ideally in the 2^30 range).
10621062
const BILLIONISH: f64 = 1024.0 * 1024.0 * 1024.0;
10631063
let numerator = (num * BILLIONISH) as u64 + 1;

0 commit comments

Comments
 (0)