-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix integer overflow in estimate_envelope (#178)
We accumulating sum of squares. With usual REAL values it limits us to source values below 256. That is not much (values of 10k sometimes appear in the stream). To fix that we exchance some precision and when squaring REAL values we use MUL_C. As a result squares are prescaled by 2^-14. I've modified range check to limit output to maximal REAL range after division and un-prescaling.
- Loading branch information
Showing
1 changed file
with
44 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters