Polynomial: Workaround for VC bug when cout << double while rounding up

This commit is contained in:
Andreas Fabri 2022-01-26 13:12:41 +00:00
parent 9eee1f19cb
commit 1d095e8a63
1 changed files with 7 additions and 0 deletions

View File

@ -285,6 +285,13 @@ void division(CGAL::Integral_domain_tag) {
template <class NT>
void io() {
// https://github.com/CGAL/cgal/issues/6272#issuecomment-1022005703
// VCbug: Setting the rounding mode influences output of double
// The rounding mode is set to CGAL_FE_UPWARD in the test ccp files
// in order to test Modular Arithmetic
// Without this change which is local to the function p == q will fail
CGAL::Protect_FPU_rounding<true> pfr(CGAL_FE_TONEAREST);
typedef CGAL::Polynomial<NT> POLY;
{