Re: [Boost-bugs] [Boost C++ Libraries] #8809: pow(cpp_dec_float_type(-1), cpp_dec_float_type(n)) != (+-)1 for n >= 0x8000000000000000u

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8809: pow(cpp_dec_float_type(-1), cpp_dec_float_type(n)) != (+-)1 for n >= 0x8000000000000000u
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-07-10 17:44:00


#8809: pow(cpp_dec_float_type(-1), cpp_dec_float_type(n)) != (+-)1 for n >=
0x8000000000000000u
--------------------------------------+----------------------------
  Reporter: Jan Bouwer <JBouwer@…> | Owner: johnmaddock
      Type: Bugs | Status: assigned
 Milestone: To Be Determined | Component: multiprecision
   Version: Boost Development Trunk | Severity: Problem
Resolution: | Keywords:
--------------------------------------+----------------------------
Changes (by johnmaddock):

 * cc: pbristow@…, e_float@… (added)
 * status: new => assigned

Comment:

 This is actually quite tricky - and hard to deal with in a consistent
 (across different backends) way.

 The issue is that these routines need to check for integer exponent when
 the base is < 1, but this is hard to do when the exponent becomes overly
 large. A related point is that once the exponent becomes sufficiently
 large it's no longer possible to determine whether it is even or odd
 (needed for the sign of the result) as the final digit has dropped off the
 end of the floating point type.

 That said we should be able to fix this up to
 {{{numeric_limits<uintmax_t>::max()}}}, and this has uncovered some broken
 error handling too. I'm CC'ing Chris and Paul into this issue in case
 they have some ideas.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8809#comment:2>
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