
Thank you for the update, and thank you for the author's efforts to deliver the second incarnation of the library.
Thank you for taking another look. Your comments and issues the first time around were helpful.
A couple of quick questions. Regarding the ISO/IEC DTR 24733, shall we treat Boost.Decimal as a literal implementation of that TR up to the last detail, or rather that it wanted to be as close as reasonable but not closer. For instance, N2849 has a different initialization interface for the decimal types.
Consider ISO/IEC DTR 24733 to be a starting point. It was written in 2009, so much has progressed since then. Example is I don't see the need to offer make_decimalXX or decimalXX_to_ functions since classes have the facilities for those. The discussion on required functions, rounding modes, etc. is derived from IEEE 754 so that is absolutely valid (and more readable than the IEEE version).
From the documentation on rounding modes ( https://develop.decimal.cpp.al/decimal/examples.html#examples_rounding_mode), I cannot figure out how I actually get to control it for my operations. Do I just create the object and as long as it is in scope all my operations have the altered mode? Or do I need to pass it to operations? If the former, does it have all the problems that globals have? For instance, the interactions with coroutines where the same lexical scope can start on one thread and finish on another? Anyway, the documentation on the rounding mode is missing.
There's a global rounding mode flag[1] that is set at compile time that you can query with fegetround() and set with fesetround(rounding_mode)[2][3]. These are globals and will have the same problems you described in theory. In practice binary floating point will also have the same issues because you are reading/writing to an FPU flag. Unlike binary floating point we do let you set the initial rounding mode via macro. This was one of the concerns in the constexpr <cmath> paper where you could have different results because of divergent rounding modes between compile time and run time [4].
The link points to the branch `develop` on GitHub. Is it the branch `develop` that is the subject of the review?
Yes, the docs match develop, and the website is automatically updated on every documentation change to committed to develop. Matt [1] https://github.com/cppalliance/decimal/blob/develop/include/boost/decimal/cf... [2] https://en.cppreference.com/w/cpp/numeric/fenv/feround.html [3] https://develop.decimal.cpp.al/decimal/cfenv.html [4] https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p0533r9.pdf