[Boost-bugs] [Boost C++ Libraries] #12964: Boost polynomial multiplication

Subject: [Boost-bugs] [Boost C++ Libraries] #12964: Boost polynomial multiplication
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-04-12 16:51:02


#12964: Boost polynomial multiplication
--------------------------------------+-------------------------
 Reporter: Adam Biggs <ambiggs23@…> | Owner: johnmaddock
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: math
  Version: Boost 1.63.0 | Severity: Problem
 Keywords: polynomial |
--------------------------------------+-------------------------
 Very simple little issue. After multiplying two
 boost::math::tools::polynomial s
 together the function polynomial::normalize() is not called and thus we
 don't reduce polynomials to their natural form. Note that it is called for
 the more general multiplication e.g

 {{{
 polynomial<int> p{0};
 polynomial<int> q{1, 1};

 std::cout << (p * q == p) << (0 * q == p)
 }}}


 output:
 {{{
  01
 }}}

 Simple fix is to jsut call normalize() after the polynomial multiplication

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12964>
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-04-12 16:53:58 UTC