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

Re: rs6000 LDBL_MAX converts to infinity


Alan Modra <amodra@bigpond.net.au> writes:
> Since you reckon LDBL_MAX ought to change, perhaps you'd like to submit
> a patch.  :)

Well, if you want to wait on me, go ahead.  I won't have time to do it
for a while though.

(Perhaps there's a subtext that this is somehow my bug.  It isn't really.
I didn't change the value of LDBL_MAX or the range of values that are
rounded to infinity.  I simply changed the representation of the infinity
so that it had the canonical form.)

>> Indeed, SGI's float.h definition of LDBL_MAX is:
>> 
>> 1.797693134862315807937289714053023E+308
>> 
>> == 0x1.FFFFFFFFFFFFF7FFFFFFFP1023L.  Try a higher number and MIPSpro cc
>> reports an error.
>
> Curious.  I'd have expected 0x1.FFFFFFFFFFFFF7FFFFFFFFFFFF8P1023L

Oops, I just instincitively added 8 digits.  Too used to 64-bit
integer constants. ;)

Richard


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