Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C++17 And the Current State of Decimal Floating Point

What is the current status of decimal floating point in C++? I am specifically looking for the status of language inclusion, standards compliance and portability.

There are a host of "official" libraries floating around which are based on existing standards (notably IEEE754-2008) which have been heralded as the groundwork for standards inclusion:

  • Bloomberg BDL Decimal Float Library

  • libdfp (originally IBM Decimal Floating Point Library)

Additionally, there was a proposal to add decimal floats to C++14. According to the proposer in this post it was not submitted in time for inclusion (see comments on answer).

I have also checked numerous sources for C++17 features, but I cannot find mention of Decimal Floating Point.

I know that some compilers (such as GCC and Clang) have implemented their own extensions based on what they believe the spec will look like. However, these extensions obviously cannot offer full support / portability for a spec that has not been officially ratified yet (as far as I am aware).

Where are we in August of 2017 on official decimal floating point support?

like image 642
MysteryMoose Avatar asked Aug 07 '17 17:08

MysteryMoose


1 Answers

C++17 is feature-complete at this point, and going out for the final vote. So whatever is there right now is what's going to be in it when the final ISO vote is made, modulo bugs/defects of course.

Decimal floats were not voted in, so they're not going to be in C++17. The last paper on the subject, N3871, was written in 2014. So it seems clear that nobody's really trying to move it forward.

like image 110
Nicol Bolas Avatar answered Sep 19 '22 00:09

Nicol Bolas