diff --git a/CGAL_Core/include/CGAL/CORE/BigFloat.h b/CGAL_Core/include/CGAL/CORE/BigFloat.h index c199c5d5c45..2e8ebde70e8 100644 --- a/CGAL_Core/include/CGAL/CORE/BigFloat.h +++ b/CGAL_Core/include/CGAL/CORE/BigFloat.h @@ -183,7 +183,7 @@ public: /// \name String Conversion Functions //@{ /// set value from const char* (base = 10) - void fromString(const char* s, const extLong& p=get_static_defBigFloatInputDigits()) { + void fromString(const char* s, extLong p = getBigFloatInputDigits()) { rep->fromString(s, p); } /// convert to std::string (base = 10) diff --git a/CGAL_Core/include/CGAL/CORE/BigFloatRep.h b/CGAL_Core/include/CGAL/CORE/BigFloatRep.h index 43d44f86cdd..65dfbb667d7 100644 --- a/CGAL_Core/include/CGAL/CORE/BigFloatRep.h +++ b/CGAL_Core/include/CGAL/CORE/BigFloatRep.h @@ -148,7 +148,7 @@ private: std::string round(std::string inRep, long& L10, unsigned int width) const; DecimalOutput toDecimal(unsigned int width=get_static_defBigFloatOutputDigits(), bool Scientific=false) const; - void fromString(const char *p, const extLong & prec = get_static_defBigFloatInputDigits()); + void fromString(const char *p, extLong prec = getBigFloatInputDigits()); void dump() const; //inline long adjustE(long E, BigInt M, long e) const; diff --git a/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h b/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h index b50bfb2eebf..34a8bb3b024 100644 --- a/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h +++ b/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h @@ -1009,7 +1009,7 @@ std::string BigFloatRep::round(std::string inRep, long& L10, unsigned int width) // See the file Real.cc for the differences CGAL_INLINE_FUNCTION -void BigFloatRep :: fromString(const char *str, const extLong & prec ) { +void BigFloatRep :: fromString(const char *str, extLong prec ) { // NOTE: prec defaults to get_static_defBigFloatInputDigits() (see BigFloat.h) // check that prec is not INFTY if (prec.isInfty()) diff --git a/CGAL_Core/include/CGAL/CORE/CoreDefs.h b/CGAL_Core/include/CGAL/CORE/CoreDefs.h index 35e6b5b8151..a05da44ff3c 100644 --- a/CGAL_Core/include/CGAL/CORE/CoreDefs.h +++ b/CGAL_Core/include/CGAL/CORE/CoreDefs.h @@ -134,6 +134,13 @@ CGAL_GLOBAL_STATE_VAR(CGAL::cpp11::atomic, defOutputDigits, get_static_def /** This value cannot be CORE_INFTY. */ CGAL_GLOBAL_STATE_VAR(CGAL::cpp11::atomic, defBigFloatInputDigits, 16) +inline +long +getBigFloatInputDigits() +{ + return get_static_defBigFloatInputDigits(); +} + /// default BigFloat Division Relative Precision CGAL_GLOBAL_STATE_VAR(extLong, defBFdivRelPrec, 54) /// default BigFloat Sqrt Absolute Precision @@ -234,6 +241,11 @@ inline bool setProgressiveEvalFlag(bool f) { return oldf; } + inline long getInitialProgressivePrec() + { + return get_static_defInitialProgressivePrec(); + } + /// set initial bit precision for progressive evaluation: inline long setDefInitialProgressivePrec(long n) { long oldn = get_static_defInitialProgressivePrec(); diff --git a/CGAL_Core/include/CGAL/CORE/CoreDefs_impl.h b/CGAL_Core/include/CGAL/CORE/CoreDefs_impl.h index 2bdcc096b15..6338c0a0560 100644 --- a/CGAL_Core/include/CGAL/CORE/CoreDefs_impl.h +++ b/CGAL_Core/include/CGAL/CORE/CoreDefs_impl.h @@ -117,7 +117,7 @@ CGAL::cpp11::atomic defBigFloatOutputDigits = 10; /** NORMALLY, we like to make this equal to defBigFloatOutputDigits * 8/3/01, Chee: re-introduced this parameter */ -CGAL::cpp11::atomic defOutputDigits = defBigFloatOutputDigits; +CGAL::cpp11::atomic defOutputDigits = 10; // == defBigFloatOutputDigits; /** String Input Precision */ diff --git a/CGAL_Core/include/CGAL/CORE/ExprRep.h b/CGAL_Core/include/CGAL/CORE/ExprRep.h index 497d8448d0f..5e5b819fce1 100644 --- a/CGAL_Core/include/CGAL/CORE/ExprRep.h +++ b/CGAL_Core/include/CGAL/CORE/ExprRep.h @@ -1109,7 +1109,7 @@ void AddSubRep::computeExactFlags() { // larger than lowBound AND the defaultInitialProgressivePrec, // so that we do at least one iteration of the for-loop. So: // i is the variable for iteration. - extLong i = core_min(get_static_defInitialProgressivePrec(), lowBound.asLong()); + extLong i = core_min(getInitialProgressivePrec(), lowBound.asLong()); extLong ua = lowBound.asLong() + EXTLONG_ONE; // NOTE: ua is allowed to be CORE_INFTY