Preventing denormalisation without messing with the hardware registers (in: DSP and Plugin Devel…)

By: signalsmith
23 Aug 10:50

The number you have is the end of the mantissa for a number around 1. But single-precision normal numbers go all the way down to 2^−126 (corresponding to exponent bits 0b00000001, since 0b00000000 means subnormals).

If you added 2^-126 (≈ 1e-38) as the constant, that would make all positive values normal, and you could extend to negative numbers as well by copying the sign. Or, you could have a larger constant, such that negative numbers can’t be represented with enough accuracy to ever p…

Go to this post

Go to first unread post in this topic

Read more here: Source link