When frexp is used within a fabs function (as shown below) the value returned is
negative.

double a = fabs(frexp(b, &i));

Example code and temp files are attached.  This code works in gcc version 3.4

-- 
           Summary: Using frexp with fabs produces negative result
           Product: gcc
           Version: 4.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: m dot broadbent at signal dot qinetiq dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-gnu-linux
  GCC host triplet: i686-gnu-linux
GCC target triplet: i686-gnu-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23195

Reply via email to