"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "check/bugme_chinrem_gcd.cpp" between
ginac-1.7.11.tar.bz2 and ginac-1.8.0.tar.bz2

About: GiNaC (GiNaC is Not a CAS (Computer Algebra System)) is a C++ library for symbolic calculations.

bugme_chinrem_gcd.cpp  (ginac-1.7.11.tar.bz2):bugme_chinrem_gcd.cpp  (ginac-1.8.0.tar.bz2)
/** @file bugme_chinrem_gcd.cpp /** @file exam_chinrem_gcd.cpp
* *
* A small program exposing historical bug in poly_cra function. */ * A small program exposing historical bug in poly_cra function. */
/* /*
* GiNaC Copyright (C) 1999-2020 Johannes Gutenberg University Mainz, Germany * GiNaC Copyright (C) 1999-2020 Johannes Gutenberg University Mainz, Germany
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
skipping to change at line 71 skipping to change at line 71
ex B = readme("9*x^2 + 1"); ex B = readme("9*x^2 + 1");
ex g = chinrem_gcd(A, B); ex g = chinrem_gcd(A, B);
if (!g.is_equal(ex(1))) { if (!g.is_equal(ex(1))) {
std::cerr << "expected 1, got " << g << std::endl; std::cerr << "expected 1, got " << g << std::endl;
throw std::logic_error("chinrem_gcd miscomputed integer content") ; throw std::logic_error("chinrem_gcd miscomputed integer content") ;
} }
} }
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
cout << "checking for bugs in poly_cra() and friends " << flush; cout << "examining in poly_cra() and friends " << flush;
check_poly_cra(); check_poly_cra();
check_extract_integer_content(); check_extract_integer_content();
integer_coeff_braindamage(); integer_coeff_braindamage();
cout << "not found."; cout << "not found.";
return 0; return 0;
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)