Skip to content

Commit

Permalink
try to fix rust-lang#170
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Schultzer <benjamin@schultzer.com>
  • Loading branch information
Schultzer committed Jul 2, 2019
1 parent fb0547e commit 710e3f9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/math/jnf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ pub fn jnf(n: i32, mut x: f32) -> f32 {
}
temp = 0.5 * x;
b = temp;
a = 1.0;
let mut a = 1;
i = 2;
while i <= nm1 + 1 {
a *= i as f32; /* a = n! */
a *= i; /* a = n! */
b *= temp; /* b = (x/2)^n */
i += 1;
}
b = b / a;
b = b / (a as f32);
} else {
/* use backward recurrence */
/* x x^2 x^2
Expand Down

0 comments on commit 710e3f9

Please sign in to comment.