On Mon, 12 Sep 2016, Tamar Christina wrote: > Hi All, > > This patch adds an optimized route to the fpclassify builtin > for floating point numbers which are similar to IEEE-754 in format.
Similar changes may be useful for __builtin_isfinite, __builtin_isnan, __builtin_isinf, __builtin_isinf_sign, __builtin_isnormal. Will your version always use only integer operations if the format is IEEE enough? If so, it could be used by glibc's <math.h> if __SUPPORT_SNAN__ (-fsignaling-nans), except in the case where IBM long double is supported, whereas presently all those built-in functions are avoided by glibc <math.h> for -fsignaling-nans. The same applies to integer versions of the other functions - whether or not they are beneficial in performance normally, they are correct for -fsignaling-nans, which the present built-in functions aren't. (I intend to add issubnormal and iszero macros to glibc following TS 18661-1; built-in versions of those would be useful as well.) -- Joseph S. Myers jos...@codesourcery.com