Opened 7 years ago

Closed 7 years ago

#11453 closed Bugs (fixed)

problem in boost/math/special_functions/detail/bernoulli_details.hpp

Reported by: Ed Vogel <edward.vogel@…> Owned by: John Maddock
Milestone: To Be Determined Component: math
Version: Boost 1.56.0 Severity: Problem
Keywords: Cc:

Description

There's an issue with boost/math/special_functions/detail/bernouli_details.hpp

The 'for' statements at (about) lines 438 and 454 need static_cast operators around the first operand to std::max to make sure the operand is cast to a std::size_t. The 'for' statement around line 482 has such a static_cast, and I expect most platforms will be using that conditional.

However, the current code fails in cases where size_t is 64-bits and unsigned is 32-bits on platforms where either BOOST_HAS_THREADS is not defined or BOOST_MATH_NO_ATOMIC_INT is defined.

Thank you,

Ed Vogel

Change History (1)

comment:1 by John Maddock, 7 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.