Topic: C99 hexadecimal floating point constants
Author: Seungbeom Kim <musiphil@bawi.org>
Date: Fri, 26 Jun 2009 00:44:44 CST Raw View
Seungbeom Kim wrote:
> 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.
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.comeaucomputing.com/csc/faq.html ]
Author: Jiang <goo.mail01@yahoo.com>
Date: Fri, 26 Jun 2009 23:57:53 CST Raw View
On Jun 26, 3:44 pm, Seungbeom Kim <musip...@bawi.org> wrote:
> Seungbeom Kim wrote:
> > 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.
>
> 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.
>
According to the following thread in this group,
(floating point issue)
http://preview.tinyurl.com/m6dcxh
, 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
--
[ 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.comeaucomputing.com/csc/faq.html ]
Author: Seungbeom Kim <musiphil@bawi.org>
Date: Thu, 26 Feb 2009 09:59:43 CST Raw View
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.comeaucomputing.com/csc/faq.html ]