C99 hexadecimal floating point constants

C99 hexadecimal floating point constants

Post by Seungbeom » Fri, 27 Feb 2009 18:59:43


Hello group,

What is the status of C99 hexadecimal floating point constants in C++0x?
I looked in N2800 and could see user-defined literals, which as far
as I understand enables much more diverse possibilities for literals,
but couldn't find anything "standard" that supports hexadecimal floating
point constants such as 0x1a.3fp-4 "out-of-the-box", i.e. without a
further definition of a conversion operator function.

Is it not being adopted into C++0x? I do expect that many C++ compilers
will provide the feature as an extension, for they have to provide it
as C compilers anyway. It would be disappointing, however, if we could
not write hexadecimal floating point literals portably in C++. The more
because it would not cause any backward incompatibility, nor be very
difficult to implement.

--
Seungbeom Kim

[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.yqcomputer.com/ ]
 
 
 

C99 hexadecimal floating point constants

Post by Seungbeom » Sat, 27 Jun 2009 09:44:44


In addition to the above, I find the omission of the hexadecimal
floating point constants the more strange because the library has the
corresponding provision, namely 'hexfloat' (equivalent to "%a"/"%A").

Not having heard about this for many months, may I ask once again
if any of you has anything to say about this? Thank you.

--
Seungbeom Kim

[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.yqcomputer.com/ ]

 
 
 

C99 hexadecimal floating point constants

Post by Jian » Sun, 28 Jun 2009 08:57:53


According to the following thread in this group,

(floating point issue)
http://www.yqcomputer.com/

, some of the *library* stuffs will be added to the next standard,
unfortunately, quite a few floating point constructs will not the be
added,
and in my opinion hexadecimal floating point constant is one of
them.

BTW, though hexadecimal floating point constant is very useful,
for the limited resource I believe the floating point types,
operators,
conversions and floating point environment and optimization,
specified by normative Annex F of C99, should be given higher
priority.

Regards,

Jiang