Opened 5 years ago
Closed 5 years ago
#13251 closed Bugs (duplicate)
Sine / cosine is not thread safe
Reported by: | Owned by: | John Maddock | |
---|---|---|---|
Milestone: | To Be Determined | Component: | multiprecision |
Version: | Boost 1.63.0 | Severity: | Showstopper |
Keywords: | Cc: |
Description
For boost::multiprecision::cpp_dec_float_* the sine / cosine functions are not thread safe. System is:
Apple LLVM version 9.0.0 (clang-900.0.37) Target: x86_64-apple-darwin16.7.0 Thread model: posix
Change History (3)
comment:1 by , 5 years ago
comment:2 by , 5 years ago
Hi,
I can reproduce the error - protecting sin/cos asin/acos with mutexes for testing makes the functions 'work' again.
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)
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)
Thanks for looking into this
comment:3 by , 5 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Closing as duplicate of https://github.com/boostorg/multiprecision/issues/40
I'm not seeing this: please explain?