This is the mail archive of the gcc-bugs@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]

[Bug c/61399] LDBL_MAX is incorrect with IBM long double format / overflow issues near large values


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.

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