[PD-dev] denormals: svf, freeverb (was Re: [PD] bug in freeverb???)
damon at karuna.eclipse.co.uk
Mon Aug 17 12:07:42 CEST 2009
On Sat, 2009-08-15 at 06:48 -0700, Ed Kelly wrote:
> Hi Damon,
> I have tried to implement this technique, to fix the svf~ and I am still getting denormal errors pegging the CPU. Is there anything I have missed do you think? After reading a little bit about unions and uint32_t I think I've used them correctly...
> If this bug can be zapped for good then I'd like to eliminate denormal errors from the svn for good!
Maybe you didn't get all the denormals. You could try adding checks for
denormals throughout the code (just while debugging), using something
static inline check_for_denormal (float value)
u.value = value;
/* A denormal has a 0 exponent and a non-0 mantissa, so check that
the value has a non-zero exponent or a 0 mantissa. */
assert ((u.i & 0x7F800000) != 0 || (u.i & 0x007FFFFF) == 0)
More information about the Pd-dev