diff --git a/Arithmetic_kernel/include/CGAL/CORE_arithmetic_kernel.h b/Arithmetic_kernel/include/CGAL/CORE_arithmetic_kernel.h index 5df573c77de..3fc908252ac 100644 --- a/Arithmetic_kernel/include/CGAL/CORE_arithmetic_kernel.h +++ b/Arithmetic_kernel/include/CGAL/CORE_arithmetic_kernel.h @@ -54,7 +54,7 @@ public: }; - +#if 0 template <> struct Get_arithmetic_kernel{ typedef CORE_arithmetic_kernel Arithmetic_kernel; @@ -63,6 +63,8 @@ template <> struct Get_arithmetic_kernel{ typedef CORE_arithmetic_kernel Arithmetic_kernel; }; +#endif + template <> struct Get_arithmetic_kernel{ typedef CORE_arithmetic_kernel Arithmetic_kernel; @@ -74,6 +76,7 @@ struct Get_arithmetic_kernel{ } //namespace CGAL + #endif // CGAL_USE_CORE #endif // CGAL_CORE_ARITHMETIC_KERNEL_H diff --git a/CGAL_Core/include/CGAL/CORE/BigFloat.h b/CGAL_Core/include/CGAL/CORE/BigFloat.h index 97183f63e50..c5df8cb8134 100644 --- a/CGAL_Core/include/CGAL/CORE/BigFloat.h +++ b/CGAL_Core/include/CGAL/CORE/BigFloat.h @@ -59,7 +59,7 @@ public: /// constructor for const char* (default base = 10) BigFloat(const char* s) : RCBigFloat(new BigFloatRep(s)) {} /// constructor for std::string(default base = 10) - BigFloat(const std::string& s) : RCBigFloat(new BigFloatRep(s)) {} + BigFloat(const std::string& s) : RCBigFloat(new BigFloatRep(s.c_str())) {} /// constructor for int and long // This is a hack because in Sturm, we need to approximate any @@ -614,11 +614,23 @@ inline BigFloat gcd(const BigFloat& a, const BigFloat& b) { //mpz_tdiv_qr(q.get_mp(), r.get_mp(), a.get_mp(), b.get_mp()); //}// - +/* AF // constructor BigRat from BigFloat inline BigRat::BigRat(const BigFloat& f) : RCBigRat(new BigRatRep()){ *this = f.BigRatValue(); } +*/ + + double doubleValue(const BigFloat& bf) + { + return bf.doubleValue(); + } + + long longValue(const BigFloat& bf) + { + return bf.longValue(); + } + } //namespace CORE #ifdef CGAL_HEADER_ONLY diff --git a/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h b/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h index 4663d7d9251..3230bc8a1ab 100644 --- a/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h +++ b/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h @@ -870,7 +870,7 @@ BigFloatRep::toDecimal(unsigned int width, bool Scientific) const { M <<= e2; // M = x * 2^(e2) } - std::string decRep = M.get_str(); + std::string decRep = M.convert_to(); // Determine the "significant part" of this string, i.e. the part which // is guaranteed to be correct in the presence of error, // except that the last digit which might be subject to +/- 1. diff --git a/CGAL_Core/include/CGAL/CORE/BigInt.h b/CGAL_Core/include/CGAL/CORE/BigInt.h index 44be47eeb1c..02e0645c4c2 100644 --- a/CGAL_Core/include/CGAL/CORE/BigInt.h +++ b/CGAL_Core/include/CGAL/CORE/BigInt.h @@ -30,6 +30,176 @@ #include #include +#if 1 + +namespace CORE { + +#ifdef CGAL_CORE_USE_GMP_BACKEND + typedef boost::multiprecision::mpz_int BigInt; +#else + typedef boost::multiprecision::cpp_int BigInt; +#endif + + +inline int cmp(const BigInt& x, const BigInt& y) { + return x.compare(y); +} + + + int set_str(BigInt& a, const char* s) { + // AF makeCopy(); + a = BigInt(s); + return 0; // should be -1 if not correct in the base (we ignore) + } + + /// longValue +inline long longValue(const BigInt& a) { + return a.convert_to();; +} + + /// doubleValue +inline double doubleValue(const BigInt& a) { + return a.convert_to();; +} + + /// isEven +inline bool isEven(const BigInt& z) { + return bit_test(z,0) == 0; +} +/// isOdd +inline bool isOdd(const BigInt& z) { + return bit_test(z,0) == 1; +} + + inline bool isDivisible(const BigInt& x, const BigInt& y) { + BigInt q, r; + divide_qr(x, y, q, r); + return r.is_zero(); +} + +inline bool isDivisible(int x, int y) { + return x % y == 0; +} + +inline bool isDivisible(long x, long y) { + return x % y == 0; + +} + /// get exponent of power 2 +inline unsigned long getBinExpo(const BigInt& z) { + if (z.is_zero()) { + return (std::numeric_limits::max)(); + } + return lsb(abs(z)); +} + + // bit length +inline int bitLength(const BigInt& a) { + if (a.is_zero()) { + return 0; + } + return msb(abs(a))+1; +} + +/// floorLg -- floor of log_2(a) +/** Convention: a=0, floorLg(a) returns -1. + * This makes sense for integer a. + */ +inline long floorLg(const BigInt& a) { + return (sign(a) == 0) ? (-1) : (bitLength(a)-1); +} + + +/// div_rem +inline void div_rem(BigInt& q, BigInt& r, const BigInt& a, const BigInt& b) { + // AF q.makeCopy(); + // AF r.makeCopy(); + divide_qr(a, b, q, r); +} + + + /// ulongValue +inline unsigned long ulongValue(const BigInt& a) { + assert(a >= BigInt(0)); + return a.convert_to(); +} + + /// exact div +inline void divexact(BigInt& z, const BigInt& x, const BigInt& y) { + // AF z.makeCopy(); + BigInt r; + divide_qr(x, y, z, r ); // was void mpz_divexact (mpz_t q, const mpz_t n, const mpz_t d) Is this faster? + assert(r.is_zero()); +} + +// Chee (1/12/2004) The definition of div_exact(x,y) next +// ensure that in Polynomials works with both NT=BigInt and NT=int: +inline BigInt div_exact(const BigInt& x, const BigInt& y) { + BigInt z; // precodition: isDivisible(x,y) + divexact(z, x, y); // z is set to x/y; + return z; +} + +inline int div_exact(int x, int y) { + return x/y; // precondition: isDivisible(x,y) +} + +inline long div_exact(long x, long y) { + return x/y; // precondition: isDivisible(x,y) +} + + +/// ceilLg -- ceiling of log_2(a) where a=BigInt, int or long +/** Convention: a=0, ceilLg(a) returns -1. + * This makes sense for integer a. + */ +inline long ceilLg(const BigInt& a) { + if (sign(a) == 0) + return -1; + unsigned long len = bitLength(a); + + return (lsb(abs(a)) == len - 1) ? (len - 1) : len; +} + +inline long ceilLg(long a) { // need this for Polynomial + return ceilLg(BigInt(a)); +} + +inline long ceilLg(int a) { // need this for Polynomial + return ceilLg(BigInt(a)); +} + + +/// negate +inline void negate(BigInt& a) { + // AF a.makeCopy(); + a= - a; +} + +/// get exponent of power k +inline void getKaryExpo(const BigInt& z, BigInt& m, int& e, unsigned long uk) { + BigInt k(uk), q, r; + e = 0; + m = z; + // AF m.makeCopy(); + for(;;) { + divide_qr(m, k, q, r); + if (!r.is_zero()) break; + m = q; + ++e; + } +} + + inline void power(BigInt& c, const BigInt& a, unsigned long ul) { + // AF c.makeCopy(); + c = pow(a, ul); +} + +} // namespace CORE + +#else + + namespace CORE { #ifdef CGAL_CORE_USE_GMP_BACKEND @@ -55,11 +225,7 @@ public: : mp(c) {} - BigIntRep(const char* s, int base=0) - : mp(s) - { assert(base == 0); } - - BigIntRep(const std::string& s, int base=0) + BigIntRep(const std::string& s) : mp(s) {} @@ -118,10 +284,9 @@ public: BigInt(float x) : RCBigInt(new BigIntRep(x)) {} /// constructor for double BigInt(double x) : RCBigInt(new BigIntRep(x)) {} - /// constructor for const char* with base - BigInt(const char* s, int base=0) : RCBigInt(new BigIntRep(s, base)) {} - /// constructor for std::string with base - BigInt(const std::string& s, int base=0) : RCBigInt(new BigIntRep(s, base)) {} + + /// constructor for std::string + BigInt(const std::string& s) : RCBigInt(new BigIntRep(s)) {} /// constructor for mpz_srcptr // explicit BigInt(mpz_srcptr z) : RCBigInt(new BigIntRep(z)) {} @@ -254,13 +419,13 @@ public: /// \name String Conversion Functions //@{ /// set value from const char* - int set_str(const char* s, int base = 0) { + int set_str(const char* s) { makeCopy(); get_mp() = Z(s); return 0; // should be -1 if not correct in the base (we ignore) } /// convert to std::string - std::string get_str(int base = 10) const { + std::string get_str() const { return get_mp().convert_to(); } //@} @@ -443,7 +608,7 @@ inline double doubleValue(const BigInt& a) { void readFromFile(BigInt& z, std::istream& in, long maxLength = 0); /// write to file -void writeToFile(const BigInt& z, std::ostream& in, int base=10, int charsPerLine=80); +void writeToFile(const BigInt& z, std::ostream& in, int charsPerLine=80); //@} */ @@ -483,8 +648,8 @@ inline void getKaryExpo(const BigInt& z, BigInt& m, int& e, unsigned long uk) { /// divisible(x,y) = "x | y" inline bool isDivisible(const BigInt& x, const BigInt& y) { - BigInt z, r; - divide_qr(x.get_mp(), y.get_mp(), z.get_mp(), r.get_mp()); + BigInt q, r; + divide_qr(x.get_mp(), y.get_mp(), q.get_mp(), r.get_mp()); return r.get_mp().is_zero(); } @@ -538,7 +703,7 @@ inline void div_rem(BigInt& q, BigInt& r, const BigInt& a, const BigInt& b) { /// power inline void power(BigInt& c, const BigInt& a, unsigned long ul) { c.makeCopy(); - c.get_mp() = pow(a.get_mp(), ul); + //c.get_mp() = pow(a.get_mp(), ul); } // pow @@ -553,7 +718,7 @@ inline int bitLength(const BigInt& a) { if (a.get_mp().is_zero()) { return 0; } - return msb(abs(a.get_mp()))+1; /// AF todo was mpz_sizeinbase(a.get_mp(), 2); + return msb(abs(a.get_mp()))+1; } /// floorLg -- floor of log_2(a) @@ -590,4 +755,6 @@ inline long ceilLg(int a) { // need this for Polynomial } //namespace CORE +#endif + #endif // _CORE_BIGINT_H_ diff --git a/CGAL_Core/include/CGAL/CORE/BigRat.h b/CGAL_Core/include/CGAL/CORE/BigRat.h index 1cab0679018..cd4747303d9 100644 --- a/CGAL_Core/include/CGAL/CORE/BigRat.h +++ b/CGAL_Core/include/CGAL/CORE/BigRat.h @@ -27,6 +27,26 @@ #include +#if 1 +namespace CORE { +#ifdef CGAL_CORE_USE_GMP_BACKEND + typedef boost::multiprecision::mpq_rational BigRat; +#else + typedef boost::multiprecision::cpp_rational BigRat; +#endif + + + /// BigIntValue + BigInt BigIntValue(const BigRat& br) { + BigInt r, rem; + divide_qr(numerator(br), denominator(br), r, rem); + return r; + } + +} // namespace CORE + +#else + namespace CORE { #ifdef CGAL_CORE_USE_GMP_BACKEND @@ -203,6 +223,8 @@ public: get_mp() /= rhs.get_mp(); return *this; } + + /* BigRat& operator <<=(unsigned long ul) { makeCopy(); assert(false); @@ -215,6 +237,7 @@ public: // AF no >> for Q get_mp() >>= ul; return *this; } + */ //@} /// \name div2, unary, increment, decrement operators @@ -259,11 +282,15 @@ public: /// \name Helper Functions //@{ /// Canonicalize + + /* void canonicalize() { makeCopy(); assert(false); // AF todo mpq_canonicalize(get_mp()); } + */ + /// Has Exact Division static bool hasExactDivision() { return true; @@ -398,6 +425,8 @@ inline bool isDivisible(const BigRat& x, const BigRat& y) { r.get_mp() = x.get_mp() / y.get_mp(); return isInteger(r); } + + /* inline BigRat operator<<(const BigRat& a, unsigned long ul) { BigRat r; assert(false); @@ -410,7 +439,7 @@ inline BigRat operator>>(const BigRat& a, unsigned long ul) { // AF todo no >> for Q r.get_mp() = a.get_mp() >> ul; return r; } - + */ inline int cmp(const BigRat& x, const BigRat& y) { return x.get_mp().compare(y.get_mp()); } @@ -477,4 +506,7 @@ inline BigInt BigIntValue(const BigRat& a) { } //namespace CORE + +#endif + #endif // _CORE_BIGRAT_H_ diff --git a/CGAL_Core/include/CGAL/CORE/CoreIO_impl.h b/CGAL_Core/include/CGAL/CORE/CoreIO_impl.h index de0f59831a8..df803aee9b8 100644 --- a/CGAL_Core/include/CGAL/CORE/CoreIO_impl.h +++ b/CGAL_Core/include/CGAL/CORE/CoreIO_impl.h @@ -164,6 +164,7 @@ void read_base_number(std::istream& in, BigInt& m, long length, long maxBits) { // read base and compute digits if (c == '0') { + assert(false); // no longer supported in.get(c); if (c == 'b') { base = 2; @@ -202,7 +203,7 @@ void read_base_number(std::istream& in, BigInt& m, long length, long maxBits) { append_char(buffer, size, pos, '\0'); // convert string to bigint. - if (m.set_str(buffer, base) < 0) + if (set_str(m, buffer) < 0) core_io_error_handler("CoreIO::read_from_file()","bad big number format."); delete[] buffer; diff --git a/CGAL_Core/include/CGAL/CORE/Promote.h b/CGAL_Core/include/CGAL/CORE/Promote.h index 62a98e434ef..d4c95c25bf0 100644 --- a/CGAL_Core/include/CGAL/CORE/Promote.h +++ b/CGAL_Core/include/CGAL/CORE/Promote.h @@ -30,6 +30,8 @@ #define __PROMOTE_H__ #include +#include +#include namespace CORE { @@ -119,9 +121,9 @@ class Promotion { * */ -class BigInt; +//class BigInt; class BigFloat; -class BigRat; +//class BigRat; class Expr; DEFINE_MAX_TYPE(long, BigInt, BigInt) diff --git a/CGAL_Core/include/CGAL/CORE/Real.h b/CGAL_Core/include/CGAL/CORE/Real.h index b79503eb4c2..78a094adcfa 100644 --- a/CGAL_Core/include/CGAL/CORE/Real.h +++ b/CGAL_Core/include/CGAL/CORE/Real.h @@ -277,7 +277,7 @@ const long halfLongMin = LONG_MIN /2; struct _real_add { template static Real eval(const T& a, const T& b) { - return a+b; + return T(a+b); } // specialized for two long values static Real eval(long a, long b) { @@ -291,7 +291,7 @@ struct _real_add { struct _real_sub { template static Real eval(const T& a, const T& b) { - return a-b; + return T(a-b); } // specialized for two long values static Real eval(long a, long b) { @@ -305,7 +305,7 @@ struct _real_sub { struct _real_mul { template static Real eval(const T& a, const T& b) { - return a*b; + return T(a*b); } // specialized for two long values static Real eval(long a, long b) { @@ -478,7 +478,7 @@ inline Real sqrt(const Real& x) { // unary minus operator template inline Real Realbase_for::operator-() const { - return -ker; + return -T(ker); } template <> inline Real RealLong::operator-() const { diff --git a/CGAL_Core/include/CGAL/CORE/RealRep.h b/CGAL_Core/include/CGAL/CORE/RealRep.h index 5a18d2748d1..6513a5693e1 100644 --- a/CGAL_Core/include/CGAL/CORE/RealRep.h +++ b/CGAL_Core/include/CGAL/CORE/RealRep.h @@ -92,10 +92,10 @@ public: int ID() const; long longValue() const { - return ker.longValue(); + return CORE::longValue(ker); } double doubleValue() const { - return ker.doubleValue(); + return CORE::doubleValue(ker); } BigInt BigIntValue() const { return BigInt(ker); @@ -231,7 +231,7 @@ inline BigInt RealBigInt::BigIntValue() const { } template<> inline BigInt RealBigRat::BigIntValue() const { - return ker.BigIntValue(); + return CORE::BigIntValue(ker); } template<> inline BigInt RealBigFloat::BigIntValue() const { @@ -500,11 +500,11 @@ inline unsigned long RealBigRat::height() const { // toString() template<> inline std::string RealBigInt::toString(long, bool) const { - return ker.get_str(); + return ker.convert_to(); } template<> inline std::string RealBigRat::toString(long, bool) const { - return ker.get_str(); + return ker.convert_to(); } template<> inline std::string RealBigFloat::toString(long prec, bool sci) const { diff --git a/Number_types/include/CGAL/CORE_BigFloat.h b/Number_types/include/CGAL/CORE_BigFloat.h index 812036e3aa6..11934a244b9 100644 --- a/Number_types/include/CGAL/CORE_BigFloat.h +++ b/Number_types/include/CGAL/CORE_BigFloat.h @@ -181,10 +181,12 @@ public: if(::CORE::bitLength(err.m()+err.err()) >= digits_long){ long shift = ::CORE::bitLength(err.m()) - digits_long + 1 ; //std::cout << "shift " << shift<< std::endl; - long new_err = ((err.m()+err.err()) >> shift).longValue()+1; + CORE::BigInt bi = (err.m() + err.err()); + bi = bi >> shift; + long new_err = CORE::longValue(bi)+1; err = CORE::BigFloat(0,new_err,0) * CORE::BigFloat::exp2(err.exp()*CORE::CHUNK_BIT+shift); }else{ - err = CORE::BigFloat(0,err.m().longValue()+err.err(),err.exp()); + err = CORE::BigFloat(0, CORE::longValue(err.m())+err.err(),err.exp()); } //print_bf(err,"new_err"); diff --git a/Number_types/include/CGAL/CORE_BigInt.h b/Number_types/include/CGAL/CORE_BigInt.h index bdeaddd10e1..d9d2b09f6bb 100644 --- a/Number_types/include/CGAL/CORE_BigInt.h +++ b/Number_types/include/CGAL/CORE_BigInt.h @@ -10,7 +10,6 @@ // // Author(s) : Michael Hemmer - #ifndef CGAL_CORE_BIGINT_H #define CGAL_CORE_BIGINT_H @@ -24,6 +23,8 @@ #include #include +#if 0 + namespace CGAL { // @@ -215,6 +216,7 @@ namespace Eigen { }; }; } +#endif #include diff --git a/Number_types/include/CGAL/CORE_BigRat.h b/Number_types/include/CGAL/CORE_BigRat.h index caf9b73886e..c69b610673e 100644 --- a/Number_types/include/CGAL/CORE_BigRat.h +++ b/Number_types/include/CGAL/CORE_BigRat.h @@ -10,7 +10,6 @@ // // Author(s) : Michael Hemmer - #ifndef CGAL_CORE_BIGRAT_H #define CGAL_CORE_BIGRAT_H @@ -21,6 +20,8 @@ #include #include // used for To_interval-functor +#if 0 + //#if defined(CGAL_CORE_BIGRAT_NUMER_DENOM_ARE_MEMBERS) // #define CGAL_CORE_NUMERATOR(X) ((X).numerator()) // #define CGAL_CORE_DENOMINATOR(X) ((X).denominator()) @@ -252,6 +253,8 @@ namespace Eigen { }; } +#endif + #include #endif // CGAL_CORE_BIGRAT_H diff --git a/Number_types/include/CGAL/CORE_coercion_traits.h b/Number_types/include/CGAL/CORE_coercion_traits.h index 3a7151ef861..2623cd09cfd 100644 --- a/Number_types/include/CGAL/CORE_coercion_traits.h +++ b/Number_types/include/CGAL/CORE_coercion_traits.h @@ -24,13 +24,12 @@ #include -//#include namespace CGAL { //CORE internal coercions: - +#if 0 // The following definitions reflect the interaction of the CORE number types // with the built in types, // CORE BigInt: @@ -46,7 +45,7 @@ namespace CGAL { CGAL_DEFINE_COERCION_TRAITS_FROM_TO(float ,::CORE::BigRat) CGAL_DEFINE_COERCION_TRAITS_FROM_TO(double ,::CORE::BigRat) CGAL_DEFINE_COERCION_TRAITS_FROM_TO(::CORE::BigInt,::CORE::BigRat) - +#endif // CORE Expr: CGAL_DEFINE_COERCION_TRAITS_FROM_TO(short ,::CORE::Expr) CGAL_DEFINE_COERCION_TRAITS_FROM_TO(int ,::CORE::Expr) @@ -78,8 +77,8 @@ struct Coercion_traits{ CORE::BigFloat result; result.approx(x,CORE::get_static_defRelPrec().toLong(),LONG_MAX); // Do not use MakeFloorExact as it changes the Bigfloat - CGAL_postcondition( ::CORE::BigRat(::CORE::BigFloat(result.m()-result.err(),0,result.exp())) <= x ); - CGAL_postcondition( ::CORE::BigRat(::CORE::BigFloat(result.m()+result.err(),0,result.exp())) >= x ); + // AF CGAL_postcondition( ::CORE::BigRat(::CORE::BigFloat(result.m()-result.err(),0,result.exp())) <= x ); + // AF CGAL_postcondition( ::CORE::BigRat(::CORE::BigFloat(result.m()+result.err(),0,result.exp())) >= x ); return result; } }; @@ -98,8 +97,8 @@ struct Coercion_traits{ CORE::BigFloat result(x,CORE::get_static_defRelPrec().toLong(),LONG_MAX); // Do not use MakeFloorExact as it changes the Bigfloat - CGAL_postcondition( ::CORE::BigRat(::CORE::BigFloat(result.m()-result.err(),0,result.exp())) <= x ); - CGAL_postcondition( ::CORE::BigRat(::CORE::BigFloat(result.m()+result.err(),0,result.exp())) >= x ); + // AF CGAL_postcondition( ::CORE::BigRat(::CORE::BigFloat(result.m()-result.err(),0,result.exp())) <= x ); + // AF CGAL_postcondition( ::CORE::BigRat(::CORE::BigFloat(result.m()+result.err(),0,result.exp())) >= x ); return result; } }; @@ -117,8 +116,8 @@ struct Coercion_traits{ Type operator()(const ::CORE::Expr x) const { CORE::BigFloat result(x, CORE::get_static_defRelPrec().toLong(),LONG_MAX); // Do not use MakeFloorExact as it changes the Bigfloat - CGAL_postcondition( ::CORE::BigRat(::CORE::BigFloat(result.m()-result.err(),0,result.exp())) <= x ); - CGAL_postcondition( ::CORE::BigRat(::CORE::BigFloat(result.m()+result.err(),0,result.exp())) >= x ); + // AF CGAL_postcondition( ::CORE::BigRat(::CORE::BigFloat(result.m()-result.err(),0,result.exp())) <= x ); + // AF CGAL_postcondition( ::CORE::BigRat(::CORE::BigFloat(result.m()+result.err(),0,result.exp())) >= x ); return result; } }; @@ -150,6 +149,8 @@ template <> struct Coercion_traits< ::CORE::Expr, CORE::BigFloat > } //namespace CGAL + + #endif // CGAL_USE_CORE #endif //CGAL_CORE_COERCION_TRAITS_H 1 //EOF diff --git a/Number_types/include/CGAL/boost_mp.h b/Number_types/include/CGAL/boost_mp.h index 340e423ad67..d8bb53bf243 100644 --- a/Number_types/include/CGAL/boost_mp.h +++ b/Number_types/include/CGAL/boost_mp.h @@ -57,6 +57,24 @@ // TODO: work on the coercions (end of the file) namespace CGAL { +template<> +struct Needs_parens_as_product{ + bool operator()(const typename boost::multiprecision::cpp_int& x){ + return x < 0; + } +}; + +template<> +struct Needs_parens_as_product{ + bool operator()(const typename boost::multiprecision::cpp_rational& x){ + if (denominator(x) != 1 ) + return true; + else + return needs_parens_as_product(numerator(x)) ; + } + +}; + // Algebraic_structure_traits diff --git a/Number_types/test/Number_types/CORE_BigInt.cpp b/Number_types/test/Number_types/CORE_BigInt.cpp index 8cfe816f043..d02fbb87f26 100644 --- a/Number_types/test/Number_types/CORE_BigInt.cpp +++ b/Number_types/test/Number_types/CORE_BigInt.cpp @@ -33,6 +33,7 @@ void test_io(){ std::stringstream ss; CGAL::IO::set_pretty_mode(ss); ss << CGAL::IO::oformat(NT(1), CGAL::Parens_as_product_tag()); + std::cout << ss.str() << std::endl; assert( ss.str() == "1"); }{ std::stringstream ss; diff --git a/Number_types/test/Number_types/CORE_BigRat.cpp b/Number_types/test/Number_types/CORE_BigRat.cpp index 60124ec0277..670791cb011 100644 --- a/Number_types/test/Number_types/CORE_BigRat.cpp +++ b/Number_types/test/Number_types/CORE_BigRat.cpp @@ -19,18 +19,18 @@ void test_io(){ std::stringstream ss; CGAL::IO::set_ascii_mode(ss); ss << CGAL::IO::oformat(NT(1)); - //std::cout << ss.str()<