Boost C++ Libraries: Ticket #12211: boost::multiprecision cpp_int renders string inconsistently w.r.t. locale https://svn.boost.org/trac10/ticket/12211 <p> When a global locale is set that differs from the classic one, the string output is inconsistent for small numbers, i.e. that fit into one limb, vs bigger numbers. If the locale defines a thousands separator, it is rendered for the small number but not for the bigger number. Example: str() will render 9.999 but also 9999999999999999 </p> <p> The reason is the different internal handling of these cases: a small number is rendered using boost lexical_cast, which evaluates the global locale, while the bigger number is constructed by hand. </p> <p> Required behavior is that the output is consistent regardless of the size of the number. In addition, it would be nice if str() would use the global locale, while the stream output respects the locale imbued into the given stream. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12211 Trac 1.4.3 Tassilo Glander <tassilo.glander@…> Tue, 17 May 2016 08:09:27 GMT attachment set https://svn.boost.org/trac10/ticket/12211 https://svn.boost.org/trac10/ticket/12211 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">bug_multiprecision_locale_str.cpp</span> </li> </ul> Ticket John Maddock Sun, 23 Oct 2016 17:15:19 GMT <link>https://svn.boost.org/trac10/ticket/12211#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12211#comment:1</guid> <description> <p> Confirmed. I do know that a lot more work needs to be done in this area. </p> </description> <category>Ticket</category> </item> </channel> </rss>