fix inefficiency of math.h isless, etc. macros
authorRich Felker <dalias@aerifal.cx>
Wed, 5 Dec 2012 19:12:57 +0000 (14:12 -0500)
committerRich Felker <dalias@aerifal.cx>
Wed, 5 Dec 2012 19:12:57 +0000 (14:12 -0500)
commit96b3ea53f9ae365a82fb537d4fdac63c2082cc22
treeba9ec1722ce133321a917423c8d97a8bc61fe377
parentb088f85582d8787911ef48449574bed4131b44a2
fix inefficiency of math.h isless, etc. macros

previously, everything was going through an intermediate conversion to
long double, which caused the extern __fpclassifyl function to get
invoked, preventing virtually all optimizations of these operations.

with the new code, tests on constant float or double arguments compile
to a constant 0 or 1, and tests on non-constant expressions are
efficient. I may later add support for __builtin versions on compilers
that support them.
include/math.h