<commit_before>#include <boost/test/unit_test.hpp>
#include "functions/integral_polynomial.hh"
#include "functions/integral_polynomial_simplifications.hh"
#include "functions/streaming.hh"
#include "functions/operators.hh"
#include "functions/polynomial_simplifications.hh"
#include "pointwise_equal.hh"

BOOST_AUTO_TEST_CASE(integral_polynomial_test) {
  using namespace manifolds;
  auto ip1 = GetIPolynomial<1, -2>();
  auto ip2 = GetIPolynomial<3, 4>();
  auto p1 = GetPolynomial(1, -2);
  auto p2 = GetPolynomial(3, 4);
  // std::cout << (ip1 + ip1 * ip2) << std::endl;
  // std::cout << (p1 + p1 * p2) << std::endl;
  PointwiseEqual(ip1, p1, 2);
  PointwiseEqual(ip2, p2, 2);
  auto ip3 = ip1 + ip1 * ip2;
  auto p3 = p1 + p1 * p2;
  PointwiseEqual(ip3, p3, 4);
}<commit_msg>Adding check that negative 0 polynomial gives zero<commit_after>#include <boost/test/unit_test.hpp>
#include "functions/integral_polynomial.hh"
#include "functions/integral_polynomial_simplifications.hh"
#include "functions/streaming.hh"
#include "functions/operators.hh"
#include "functions/polynomial_simplifications.hh"
#include "pointwise_equal.hh"

BOOST_AUTO_TEST_CASE(integral_polynomial_test) {
  using namespace manifolds;
  auto ip1 = GetIPolynomial<1, -2>();
  auto ip2 = GetIPolynomial<3, 4>();
  auto p1 = GetPolynomial(1, -2);
  auto p2 = GetPolynomial(3, 4);
  PointwiseEqual(ip1, p1, 2);
  PointwiseEqual(ip2, p2, 2);
  auto ip3 = ip1 + ip1 * ip2;
  auto p3 = p1 + p1 * p2;
  PointwiseEqual(ip3, p3, 4);

  BOOST_CHECK_EQUAL(-GetIPolynomial<0>(), zero);
}
{'fraction_non_alphanumeric': 0.14368556701030927, 'fraction_numerical': 0.04252577319587629, 'mean_word_length': 5.364754098360656, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '923797', 'n_tokens_mistral': 625, 'n_tokens_neox': 597, 'n_words': 125}