This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix folding of logb (-Inf) (PR tree-optimization/57066)


On Thu, 25 Apr 2013, Marek Polacek wrote:

This is an attempt to fix PR57066, where when folding logb call,
we returned -Inf for logb(-Inf), which is not correct.

I had to adjust one testcase, because it checked for a wrong value.

What I don't know yet is what we should return for -Nan, it should be
in C9X standard, but I don't have it by hand.

Doesn't matter:

"Recommended practice

If a function with one or more NaN arguments returns a NaN result, the result should be the same as one of the NaN arguments (after possible type conversion), except perhaps for the sign."


"F.9.3.11 The logb functions
â logb(Â0) returns ââ and raises the ââdivide-by-zeroââ floating-point exception.
â logb(Ââ) returns â."

--
Marc Glisse


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]