mirror of
https://github.com/aicodix/dsp.git
synced 2026-04-27 22:35:45 +00:00
return the sum earlier on convergence
This commit is contained in:
parent
1a7d4d2dc1
commit
f1f34d1123
1 changed files with 2 additions and 1 deletions
|
|
@ -80,7 +80,8 @@ class Kaiser
|
|||
// double: 35 iterations
|
||||
for (int n = 1; n < 35; ++n) {
|
||||
TYPE tmp = x / TYPE(2 * n);
|
||||
sum(val *= tmp * tmp);
|
||||
if (sum.same(val *= tmp * tmp))
|
||||
return sum();
|
||||
}
|
||||
return sum();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue