On Sat, Oct 11, 2025 at 9:13 AM Matt Borland <matt@mattborland.com> wrote:
but documentation claims they offer same results as non fast ones. Is this documentation issue or you think documentation is correct? I would say that the fact that value X in non fast can be divided in and produce subnormal result(greater than 0) is quite different from getting rounding to 0 for fast type.
I can add a blurb to the effect of "within it's domain". Subnormals aren't particularly useful so I would not argue it's markedly different mathematical support. There are plenty of compilers, optimizers, hardware platforms etc. that will flush your binary floating point subnormals to 0.
I am not that familiar with this, but I would think that is a separate issue. Behavior of one type that is controlled by compiler and CPU is dependent on compiler and CPU. OK, there are some documentation somewhere about flags and CPU vendors probably say what happens during FP computation. But if software types behave differently then that should be documented. From reading documentation I would expect bitwise same results(obviously ignoring that those bits are differently packed in the fast and non fast types, I am talking about extracting the sign, exp, sig and comparing them). If some other reviewer disagrees please write here or write in your review. :) Additional question about numbers.hpp I am quite confused so I thought to ask before digging deeper. std::println("pi is {:.36e}", T{boost::decimal::numbers::pi}); std::println("pi is {:.36e}", T{boost::decimal::numbers::detail::pi_v<T>()}); prints different value for decimal128 since numbers::pi is decima64. Is this intentional? std::numbers::pi is double not long double so on my machine for long double using numbers::pi is *wrong* way to initialize the variable. I have no idea why std:: did this(I presume because long double is 64 bit on some platforms or because double is much more common, or...). In any case seems like quite a footgun in Decimal as users might init decimal128 with decimal64 constant... Am I missing something?