Thread overview
(docs) hexadecimal floats
Jan 20, 2005
Walter
January 13, 2005
Either it's a bug, or I don't understand something.
In lex.html, in the section Floating Literals, it reads:

Hexadecimal floats are preceded with a 0x and the exponent is a p  or P followed by a power of 2.

However, as an example, this is provided:

0x1.FFFFFFFFFFFFFp1023		// double.max

I tested it on dmd 0.110 for windows, and it's accepted as valid, but 1023 clearly is not a power of 2.


_______________________
Carlos Santander Bernal
January 20, 2005
"Carlos Santander B." <csantander619@gmail.com> wrote in message news:cs4ki9$ren$1@digitaldaemon.com...
> Either it's a bug, or I don't understand something.
> In lex.html, in the section Floating Literals, it reads:
>
> Hexadecimal floats are preceded with a 0x and the exponent is a p  or P followed by a power of 2.
>
> However, as an example, this is provided:
>
> 0x1.FFFFFFFFFFFFFp1023 // double.max
>
> I tested it on dmd 0.110 for windows, and it's accepted as valid, but 1023 clearly is not a power of 2.

It should read an exponent of 2, as in 2^1023.


January 20, 2005
Walter wrote:
> "Carlos Santander B." <csantander619@gmail.com> wrote in message
> news:cs4ki9$ren$1@digitaldaemon.com...
> 
>>Either it's a bug, or I don't understand something.
>>In lex.html, in the section Floating Literals, it reads:
>>
>>Hexadecimal floats are preceded with a 0x and the exponent is a p  or P
>>followed by a power of 2.
>>
>>However, as an example, this is provided:
>>
>>0x1.FFFFFFFFFFFFFp1023 // double.max
>>
>>I tested it on dmd 0.110 for windows, and it's accepted as valid, but
>>1023 clearly is not a power of 2.
> 
> 
> It should read an exponent of 2, as in 2^1023.
> 
> 

Oh, I see.

_______________________
Carlos Santander Bernal