<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">I don't know how that actually works because for CPUs that don't support denormal arithmetic or bash them to zero it can go to a software assist, but I'm not sure where in the chain that happens. I don't think there's any solid way to avoid doing a computation that results in a denormal or having to zero one out once it's there. If I had to guess, I'd wager that the assist doesn't kick in until you try to do something with one. If you want something that will catch just denormals it's easy, but notice also that PD_BIGORSMALL also tags infs and nans for free.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 21, 2018 at 2:05 PM, Jonathan Wilkes <span dir="ltr"><<a href="mailto:jon.w.wilkes@gmail.com" target="_blank">jon.w.wilkes@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="gmail-">>> 4. Just curious-- why the choice of 0x20000000 for the cutoff?<br>
><br>
><br>
> Because it's very fast and gets a reasonable range for high and low that are<br>
> roughly inverse magnitude.<br>
<br>
</span>So technically, we have no macro to test for denormals. Instead, we have a<br>
check for numbers past a given conservative threshold, and that check can be<br>
used to keep most filters from ever arriving at denormal values. (Again, just<br>
trying to be as precise as possible.)<br>
<br>
Also, just for my own curiosity:<br>
Suppose math.h did indeed have a fast-tracked issubnormal function.<br>
Would that be sufficient to keep dsp algorithms from hitting a slow<br>
branch? Or does a computation that results in a denormal (or even zeroing out a<br>
denormal) cause a slow-path computation?<br>
<span class="gmail-HOEnZb"><font color="#888888"><br>
-Jonathan<br>
</font></span><div class="gmail-HOEnZb"><div class="gmail-h5">______________________________<wbr>_________________<br>
L2Ork-dev mailing list<br>
<a href="mailto:L2Ork-dev@disis.music.vt.edu">L2Ork-dev@disis.music.vt.edu</a><br>
<a href="https://disis.music.vt.edu/listinfo/l2ork-dev" rel="noreferrer" target="_blank">https://disis.music.vt.edu/<wbr>listinfo/l2ork-dev</a></div></div></blockquote></div><br></div>