0 : n;[James Morris]
>On 15 July 2010 18:23, Harry Van Haaren wrote:
I can't seem to remember the most sensible numeric limit for this=20
branching variant of denormal removal -- besides, it obviously depends=20
on the context in question and the use of floats versus doubles (as=20
does the use of fabsf versus fabs in what follows) -- but I am quite=20
positive that the following line, which replaces the above one, is not=20
only easier to read, but also stands a good chance of executing=20
quicker on most contemporary CPUs due to the elimination of at least=20
one branching instruction:
=09n =3D fabs(n) < 1e-9 ? 0 : n;=20
Cheers, Tim
LINUX® is a registered trademark of Linus Torvalds in the USA and other countries.
Linuxaudio.org logo copyright Thorsten Wilms © 2006.
Hosting provided by the Virginia Tech Department of Music and DISIS.