libdspl-2.0 icon indicating copy to clipboard operation
libdspl-2.0 copied to clipboard

long double in arguments and return value

Open yanovich opened this issue 4 years ago • 2 comments

Great job done, first of all!

I would like to suggest an improvement. If k is close to 1.0, elliptic functions become difficult to calculate. It seems that K(k) is limited to ~70 in practice. Having 128bit floating point values will allow far greater values of K(k).

yanovich avatar Apr 28 '20 07:04 yanovich

Thanks! Need to research 64 and 128 bits influence to the elliptic functions calculation accuracy. I have compared elliptic IIR filters which was calculated in "double" and I have close accuracy corrssponds to Matlab, Python and Octave realization.

Dsplib avatar May 01 '20 14:05 Dsplib

Its an issue. The Hi-Q (extremely low transition width) IIR elliptic coefficients (filter order 19-20) looks inexactly. The gcc __float128 looks good for the case; but GNU MPFR looks just more good (is 500+dB real? :). Btw, it seems, that Matlab, Python and Octave uses double 64-bit float by default, so the result looks same.

rat-and-catcher avatar Jul 23 '23 17:07 rat-and-catcher