EWMA icon indicating copy to clipboard operation
EWMA copied to clipboard

Something must be wrong in the template...

Open FredM67 opened this issue 5 months ago • 0 comments

As far as I've understood the doc, all these lines should be equivalent: EwmaT<int32_t> ewmat_sliding_Average(1, 125, 0); => result is ok ! EwmaT<int32_t> ewmat_sliding_Average(4, 500, 0); => result is KO ! EwmaT<int32_t> ewmat_sliding_Average(8, 1000, 0); => result is KO !

But it looks like, at some time in the calculation, there's an overflow (I add only values between 0 and 30000).

Some compile-time validation or so should be implemented to know what is the limit, .... or at least documented !

FredM67 avatar Jan 23 '24 15:01 FredM67