Boost C++ Libraries: Ticket #13251: Sine / cosine is not thread safe https://svn.boost.org/trac10/ticket/13251 <p> For boost::multiprecision::cpp_dec_float_* the sine / cosine functions are not thread safe. System is: </p> <p> Apple LLVM version 9.0.0 (clang-900.0.37) Target: x86_64-apple-darwin16.7.0 Thread model: posix </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/13251 Trac 1.4.3 John Maddock Tue, 26 Dec 2017 12:48:35 GMT <link>https://svn.boost.org/trac10/ticket/13251#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/13251#comment:1</guid> <description> <p> I'm not seeing this: please explain? </p> </description> <category>Ticket</category> </item> <item> <author>martin@…</author> <pubDate>Fri, 05 Jan 2018 11:27:39 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/13251#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/13251#comment:2</guid> <description> <p> Hi, </p> <p> I can reproduce the error - protecting sin/cos asin/acos with mutexes for testing makes the functions 'work' again. </p> <p> This problem seems to be compiler-specific, does not happen with clang-5.0.0 (linux), but gcc 6.3.0, 6.4.0, 7.2.0 (linux) and MSVC 14.0 (2015) are affected, using boost 1.65.1. The problem does not occur in boost 1.64.0 in my setup. (boost release builds) </p> <p> I have not done much testing, but the functions only fail seldomly, and if they do they seem to be correct in the first digits. (using cpp_dec_float with 50 bits precision) </p> <p> Thanks for looking into this </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Wed, 31 Jan 2018 19:41:24 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/13251#comment:3 https://svn.boost.org/trac10/ticket/13251#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">duplicate</span> </li> </ul> <p> Closing as duplicate of <a class="ext-link" href="https://github.com/boostorg/multiprecision/issues/40"><span class="icon">​</span>https://github.com/boostorg/multiprecision/issues/40</a> </p> Ticket