[PATCH 6/8] Refactor CHOOSE() macro usage in libm-tests.inc

Joseph Myers joseph@codesourcery.com
Wed May 18 21:39:00 GMT 2016


Suppose we know the constant / function suffixes, and the prefix such as 
LDBL for macros.  What do we then need CHOOSE for?

The answer seems to be:

* Generating textual names used for ulps in print_function_ulps, 
print_complex_function_ulps.

* Generating ULPs entries output by gen-libm-test.pl in libm-test-ulps.h.

The former is eliminated by your patch 1.  As for the latter, how about 
making the ulps arrays generated by libm-test-ulps.h contain the type 
names explicitly, rather than containing calls to CHOOSE (and adjust the 
binary search to match both a function name and a type name)?  That way, 
you can completely eliminate the CHOOSE macro, which seems the better 
approach.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Libc-alpha mailing list