[LAD] Denormals / subnormals (again)
Fons Adriaensen
fons at linuxaudio.org
Tue Jan 3 02:51:47 UTC 2012
On Mon, Jan 02, 2012 at 09:30:56PM -0500, Paul Davis wrote:
> On Mon, Jan 2, 2012 at 9:17 PM, Fons Adriaensen <fons at linuxaudio.org> wrote:
>
> > I don't agree with blaming the Intel architecture. Denormals are
> > just one tiny aspect of a much wider issue which is numerical
> > precision and stability, and that affects all architectures.
> > Anyone writing numerical or DSP code should be aware of this
> > and be able to analyse the algorithm. You don't produce good
> > numerical or DSP code by blindly implementing textbook equations.
>
> absolutely.
>
> but there are two aspects to this issue:
>
> (1) good numerical or DSP code
> (2) not slowing the processor down by a factor of 10 or more
>
> non-Intel architectures took care of (2), while leaving (1) for the
> programmer to tackle.
Again I don't agree these are two different issues.
'Taking care of (2)' may avoid the slowdown, but it may also
hide the real problem, which is that you are trying to do a
computation that is beyond the limits of what the FPU can do.
And that problem is *not* solved by ensuring there will be
no slowdown. In some cases replacing small values (of which
denormals are just one form) by zero or adding a small bias
may help. In other cases it doesn't and it just produces new
problems. Such a method is no substitute for analysis, not any
more than blindly changing floats into doubles and hoping for
the best.
Ciao,
--
FA
Vor uns liegt ein weites Tal, die Sonne scheint - ein Glitzerstrahl.
More information about the Linux-audio-dev
mailing list