Skip to content

Commit

Permalink
Break long lines
Browse files Browse the repository at this point in the history
  • Loading branch information
FreezyLemon committed Apr 22, 2024
1 parent 0534a01 commit 6bdd602
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/distribution/gamma.rs
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,11 @@ mod tests {
for &(arg, res) in test.iter() {
test_case_special(arg, res, 10e-6, f);
}
let test = [((10.0, 10.0), 0.9), ((10.0, 1.0), 9.0), ((10.0, f64::INFINITY), 0.0)];
let test = [
((10.0, 10.0), 0.9),
((10.0, 1.0), 9.0),
((10.0, f64::INFINITY), 0.0),
];
for &(arg, res) in test.iter() {
test_case(arg, res, f);
}
Expand Down
8 changes: 7 additions & 1 deletion src/distribution/laplace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,13 @@ mod tests {
#[test]
fn test_entropy() {
let entropy = |x: Laplace| x.entropy().unwrap();
test_almost(f64::NEG_INFINITY, 0.1, (2.0 * f64::consts::E * 0.1).ln(), 1E-12, entropy);
test_almost(
f64::NEG_INFINITY,
0.1,
(2.0 * f64::consts::E * 0.1).ln(),
1E-12,
entropy,
);
test_almost(-6.0, 1.0, (2.0 * f64::consts::E).ln(), 1E-12, entropy);
test_almost(1.0, 7.0, (2.0 * f64::consts::E * 7.0).ln(), 1E-12, entropy);
test_almost(5., 10., (2. * f64::consts::E * 10.).ln(), 1E-12, entropy);
Expand Down

0 comments on commit 6bdd602

Please sign in to comment.