@@ -65,6 +65,7 @@ using namespace scip;
6565#endif
6666
6767/* * print SCIP_RATIONAL to output stream */
68+ static
6869std::ostream& operator <<(
6970 std::ostream& os, /* *< output stream */
7071 SCIP_RATIONAL const & r /* *< rational to print */
@@ -1834,10 +1835,8 @@ void SCIPrationalPrint(
18341835{
18351836 if ( rational == NULL )
18361837 std::cout << " unknown" << std::flush;
1837- else if ( rational->isinf )
1838- std::cout << (rational->val .sign () > 0 ? " +" : " -" ) << " infinity" << std::flush;
18391838 else
1840- std::cout << rational-> val << std::flush;
1839+ std::cout << * rational << std::flush;
18411840}
18421841
18431842/* * printf extension for rationals (not supporting all format options) */
@@ -2358,7 +2357,7 @@ void SCIPrationalComputeApproximationLong(
23582357 res->isinf = FALSE ;
23592358 res->isfprepresentable = SCIP_ISFPREPRESENTABLE_UNKNOWN;
23602359
2361- SCIPdebug (std::cout << " approximating " << src-> val << " by " << res-> val << std::endl);
2360+ SCIPdebug (std::cout << " approximating " << * src << " by " << * res << std::endl);
23622361
23632362 return ;
23642363 }
@@ -2382,7 +2381,7 @@ void SCIPrationalComputeApproximationLong(
23822381
23832382 done = 0 ;
23842383
2385- SCIPdebug (std::cout << " approximating " << src-> val << " by continued fractions with maxdenom " << maxdenom << std::endl);
2384+ SCIPdebug (std::cout << " approximating " << * src << " by continued fractions with maxdenom " << maxdenom << std::endl);
23862385 SCIPdebug (std::cout << " confrac initial values: p0 " << p[1 ] << " q0 " << q[1 ] << " p1 " << p[2 ] << " q1 " << q[2 ] << std::endl);
23872386
23882387 /* if q is already big, skip loop */
@@ -2563,7 +2562,7 @@ void SCIPrationalComputeApproximation(
25632562 res->isinf = FALSE ;
25642563 res->isfprepresentable = SCIP_ISFPREPRESENTABLE_UNKNOWN;
25652564
2566- SCIPdebug (std::cout << " approximating " << src-> val << " by " << res-> val << std::endl);
2565+ SCIPdebug (std::cout << " approximating " << * src << " by " << * res << std::endl);
25672566
25682567 return ;
25692568 }
@@ -2584,7 +2583,7 @@ void SCIPrationalComputeApproximation(
25842583
25852584 done = 0 ;
25862585
2587- SCIPdebug (std::cout << " approximating " << src-> val << " by continued fractions with maxdenom " << maxdenom << std::endl);
2586+ SCIPdebug (std::cout << " approximating " << * src << " by continued fractions with maxdenom " << maxdenom << std::endl);
25882587 SCIPdebug (std::cout << " confrac initial values: p0 " << p[1 ] << " q0 " << q[1 ] << " p1 " << p[2 ] << " q1 " << q[2 ] << std::endl);
25892588
25902589 /* if q is already big, skip loop */
0 commit comments