Opened 6 years ago

Closed 6 years ago

#12532 closed Bugs (fixed)

boost::math::polynomial::evaluate does not work for the zero polynomial

Reported by: kartikmohta@… Owned by: John Maddock
Milestone: To Be Determined Component: math
Version: Boost Development Trunk Severity: Regression
Keywords: Cc:

Description

Due to a recent change in the representation of the zero polynomial, I think the evaluate function is broken for the zero polynomial.

Currently if the evaluate method is called on a zero polynomial, it returns:

/usr/include/boost/math/tools/rational.hpp:191: U boost::math::tools::evaluate_polynomial(const T*, const U&, std::size_t) [with T = double; U = double; std::size_t = long unsigned int]: Assertion `count > 0' failed.

Attachments (1)

boost_zero_polynomial_evaluate.patch (448 bytes ) - added by kartikmohta@… 6 years ago.

Download all attachments as: .zip

Change History (4)

by kartikmohta@…, 6 years ago

comment:1 by kartikmohta@…, 6 years ago

Version: Boost 1.61.0Boost Development Trunk

comment:2 by kartikmohta@…, 6 years ago

Also added a pull request on the github repo (https://github.com/boostorg/math/pull/50) since I was not sure which is the preferred method.

comment:3 by John Maddock, 6 years ago

Resolution: fixed
Status: newclosed

Confirmed and merge PR, many thanks!

Note: See TracTickets for help on using tickets.