This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/61399] LDBL_MAX is incorrect with IBM long double format / overflow issues near large values
- From: "vincent-gcc at vinc17 dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 03 Jun 2014 00:07:53 +0000
- Subject: [Bug c/61399] LDBL_MAX is incorrect with IBM long double format / overflow issues near large values
- Auto-submitted: auto-generated
- References: <bug-61399-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61399
--- Comment #1 from Vincent LefÃvre <vincent-gcc at vinc17 dot net> ---
(In reply to Vincent LefÃvre from comment #0)
> One may choose to keep the behavior, i.e. consider that the high double is
> the value rounded to double precision, but this means that the
> floating-point model would need to be changed; otherwise some values are not
> representable, as shown above.
By "the floating-point model would need to be changed", I mean, for instance,
choose LDBL_MAX_EXP = 1023. I think that this would be correct. A possible
drawback is that one would have LDBL_MAX_EXP < DBL_MAX_EXP, but I don't think
that this is a problem (note that one already has LDBL_MIN_EXP > DBL_MIN_EXP).
This would just mean that one has "not normalized" values outside the normal
range.