[Bug middle-end/23195] [4.0/4.1 Regression] Using frexp with fabs produces negative result
reichelt at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Aug 2 12:35:00 GMT 2005
------- Additional Comments From reichelt at gcc dot gnu dot org 2005-08-02 12:34 -------
Here's a snippet from the manpage from hpux (as found on
http://www.informatik.uni-frankfurt.de/doc/man/hpux/frexp.3c.html )
which supports my claim from comment #8:
NAME
frexp(), ldexp(), modf() - split floating-point into mantissa and
exponent
SYNOPSIS
DESCRIPTION
Every non-zero number can be written uniquely as x*(2**n) where the
``mantissa'' (fraction) x is in the range 0.5 _ |x| < 1.0, and the
``exponent'' n is an integer.
frexp() returns the mantissa of a double value, and stores the
exponent indirectly in the location pointed to by eptr.
If value is zero, both results returned by frexp are
zero.
ldexp() returns the quantity value*(2**exp).
modf() returns the signed fractional part of value and stores
the integral part indirectly in the location pointed to
by iptr.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23195
More information about the Gcc-bugs
mailing list