Subject: [Boost-bugs] [Boost C++ Libraries] #8798: pow(cpp_dec_float_type(0), cpp_dec_float_type(n)) != 0 for n > 1
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-07-08 12:45:17
#8798: pow(cpp_dec_float_type(0), cpp_dec_float_type(n)) != 0 for n > 1
-------------------------------------+----------------------------
Reporter: Jan Bouwer <JBouwer@â¦> | Owner: johnmaddock
Type: Bugs | Status: new
Milestone: To Be Determined | Component: multiprecision
Version: Boost Development Trunk | Severity: Problem
Keywords: |
-------------------------------------+----------------------------
The overload of 'pow' taking both arguments of number<cpp_dec_float<...>>
gives a wrong answer when the base == 0 and the exponent > 1.
eg.
{{{
using T = cpp_dec_float_50;
assert( pow(T(0), T(2)) == 0 ); // Failure
}}}
Tested against svn #84980
with clang (Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM
3.2svn))
target: x86_64-apple-darwin12.4.0
with: -std=c++11 -stdlib=libc++
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8798> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:13 UTC