Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBlueMatt committed Dec 18, 2024
1 parent 6e6ea2d commit 10e8037
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lightning/src/routing/scoring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1192,7 +1192,7 @@ fn success_probability(

// Because our numerator and denominator max out at 0.0078125 we need to multiply them
// by quite a large factor to get something useful (ideally in the 2^30 range).
const BILLIONISH: f64 = 32.0 * 1024.0 * 1024.0 * 1024.0;
const BILLIONISH: f64 = 16.0 * 1024.0 * 1024.0 * 1024.0;
let numerator = (num * BILLIONISH) as u64 + 1;
let denominator = (den * BILLIONISH) as u64 + 1;
debug_assert!(numerator <= 1 << 30, "Got large numerator ({}) from float {}.", numerator, num);
Expand Down

0 comments on commit 10e8037

Please sign in to comment.