Re: [Boost-bugs] [Boost C++ Libraries] #9802: It seems as if integer division is being returned as a floating point

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9802: It seems as if integer division is being returned as a floating point
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-03-21 22:31:01


#9802: It seems as if integer division is being returned as a floating point
-------------------------------+----------------------------
  Reporter: ajgibson@… | Owner: johnmaddock
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: multiprecision
   Version: Boost 1.55.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+----------------------------

Comment (by steven_watanabe):

 This is happening because the expression template system is re-associating
 the operations in number::do_multiplies.

 {{{
 #!c++
    template <class Exp>
    void do_multiplies(const Exp& e, const detail::divides&)
    {
       typedef typename Exp::left_type left_type;
       typedef typename Exp::right_type right_type;
       do_multiplies(e.left(), typename left_type::tag_type());
       do_divide(e.right(), typename right_type::tag_type());
    }
 }}}

 Note how this effectively turns ... * (a / b) into ... * a / b.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9802#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:15 UTC