This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: freebsd vs std::numeric_limits
On Tue, Oct 22, 2002 at 03:06:09AM -0500, Loren James Rittle wrote:
> However, regarding the installed compiler, the contents of <float.h>
> as revealed with `gcc -dM -E' look different w.r.t. /usr/bin/gcc 2.95,
> even after resolving the additional macro redirection under the new
> scheme:
>
> __LDBL_MAX_EXP__ 16384 (should be 1024)
> __LDBL_MIN_EXP__ (-16381) (should be (-1021))
See, but the thing is, my numbers are *correct*. If you do
computation, this is the largest exponent before overflow.
> The upshot is that the trivial program which prints LDBL_MAX using
> printf() from libc fails; it prints Inf instead.
Your printf is broken then. It probably converts long double
to plain double internally.
Someone really needs to decide what the hell FreeBSD is intending
to accomplish here. With the current state of things, there is
nothing that I can write that isn't wrong.
r~