------- Additional Comments From rguenth at gcc dot gnu dot org 2005-08-02 12:07 ------- Well...
int tree_expr_nonnegative_p (tree t) { ... CASE_BUILTIN_F (BUILT_IN_FREXP) ... /* Always true. */ return 1; Which the manpage of frexp seems to support: DESCRIPTION The frexp() function is used to split the number x into a normalized fraction and an exponent which is stored in exp. RETURN VALUE The frexp() function returns the normalized fraction. If the argument x is not zero, the normalized fraction is x times a power of two, and is always in the range 1/2 (inclusive) to 1 (exclusive). If x is zero, then the normalized fraction is zero and zero is stored in exp. so, we just fold away the fabs. Your libm is broken. And: src/tests> ./test_frexp q: -123.456 a: 0.9645 e: 7 q: -123.456 a: 0.9645 b: -0.9645 e: 7 though why b is negative here, contradicting the manpage, is unclear to me. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23195