Re: [linux-audio-dev] swh plugins and fixing undenormalize

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] swh plugins and fixing undenormalize
From: Erik de Castro Lopo (erikd-lad_AT_mega-nerd.com)
Date: Thu Jun 24 2004 - 11:36:47 EEST


On Thu, 24 Jun 2004 10:37:35 +0100
Simon Jenkins <sjenkins_AT_blueyonder.co.uk> wrote:
> inline float FlushToZero( volatile float f )
> {
> f += 9.8607615E-32f;
> return f - 9.8607615E-32f;
> }
>
> /* end */
>
> The people who discovered it first call this method
> "Elimination by Quantification".
>
> Its slightly blunt because it damages the precision of
> extremely low but not yet denormal numbers: Anything
> of magnitude < 2 ** -103 loses one bit of precision for
> each binary order of magnitude it is below that number.
> (This means that denormal numbers lose /all/ of their
> precision and become zero).

There we go!!! That is an elegant solution.

Erik

-- 
+-----------------------------------------------------------+
  Erik de Castro Lopo  nospam_AT_mega-nerd.com (Yes it's valid)
+-----------------------------------------------------------+
"Republicans understand the importance of bondage between
mother and child." - George W. Bush
-- 
+-----------------------------------------------------------+
  Erik de Castro Lopo  nospam_AT_mega-nerd.com (Yes it's valid)
+-----------------------------------------------------------+
Everyone seems to assume that the current system in America is capitalism.
I beg to differ. True capitalism does not involve false advertising,
distribution cartels, or political lobbying for special advantages in the
market. How can you call Microsoft or the RIAA capitalist, when their main
business is interfering with a free market? Some of us would like to see a
*return* to capitalism in this country. - Jim Flynn on Linuxtoday.com


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Thu Jun 24 2004 - 11:31:21 EEST