On 12/20, Dario Sanfilippo wrote:
>
> > --- a/filters.lib
> > +++ b/filters.lib
> > @@ -1004,7 +1004,7 @@ declare tf2np copyright "Copyright (C) 2003-2019 by
> > Julius O. Smith III <jos@ccr
> >  declare tf2np license "MIT-style STK-4.3 license";
> >  tf2np(b0,b1,b2,a1,a2) = allpassnnlt(M,sv) : sum(i,M+1,*(tghr(i)))
> >  with {
> > -  smax = 0.9999; // maximum reflection-coefficient magnitude allowed
> > +  smax = 0.999999999; // maximum reflection-coefficient magnitude allowed
> >    s2 = max(-smax, min(smax,a2)); // Project both reflection-coefficients
> >    s1 = max(-smax, min(smax,a1/(1+a2))); // into the defined
> > stability-region.
> >    sv = (s1,s2); // vector of sin(theta) reflection coefficients
> >
> >
> If I'm not wrong, anything above 0.9999999 would be rounded to 1 in single
> precision, right?

Quite possibly, I didn't even bother to check.

In case it was not clear, I didn't try to propose a fix, I just tried to
identify where does the problem come from.

> Would it be possible to choose different constants based on different
> options given to the compiler?

Yes, perhaps we should use singleprecision/doubleprecision I dunno. (Can't
resist I think this feature was a mistake but this is offtopic ;)

Even if we forget about single precision, I simply do not know how much
we can enlarge this limit. The 0.999999999 value I used is just the "random
number closer to 1".

> If not, a philosophical question (not really) for these situations might
> be: should we prioritise single precision or double precision
> performance/stability?

Good question! please inform me when you know the answer? ;)

Oleg.



_______________________________________________
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users

Reply via email to