Skip to content

Commit

Permalink
remove non-used functions
Browse files Browse the repository at this point in the history
  • Loading branch information
sloriot committed Feb 28, 2024
1 parent 2504625 commit 6da4e7a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 41 deletions.
27 changes: 0 additions & 27 deletions CGAL_Core/include/CGAL/CORE/BigFloat.h
Original file line number Diff line number Diff line change
Expand Up @@ -513,32 +513,6 @@ inline long minStar(long m, long n) {
}
/// \name Functions for Compatibility with BigInt (needed by Poly, Curves)
//@{
/// isDivisible(a,b) = "is a divisible by b"
/** Assuming that a and b are in coanonized forms.
Defined to be true if mantissa(b) | mantissa(a) &&
exp(b) = min*(exp(b), exp(a)).
* This concepts assume a and b are exact BigFloats.
*/
inline bool isDivisible(const BigFloat& a, const BigFloat& b) {
// assert: a and b are exact BigFloats.
if (sign(a.m()) == 0) return true;
if (sign(b.m()) == 0) return false;
unsigned long bin_a = getBinExpo(a.m());
unsigned long bin_b = getBinExpo(b.m());

BigInt m_a = a.m() >> bin_a;
BigInt m_b = b.m() >> bin_b;
long e_a = bin_a + BigFloatRep::bits(a.exp());
long e_b = bin_b + BigFloatRep::bits(b.exp());
long dx = minStar(e_a, e_b);

return isDivisible(m_a, m_b) && (dx == e_b);
}

inline bool isDivisible(double x, double y) {
//Are these exact?
return isDivisible(BigFloat(x), BigFloat(y));
}

/// div_exact(x,y) returns the BigFloat quotient of x divided by y
/** This is defined only if isDivisible(x,y).
Expand All @@ -551,7 +525,6 @@ inline bool isDivisible(double x, double y) {
// normalizing it then we get zero.
inline BigFloat div_exact(const BigFloat& x, const BigFloat& y) {
BigInt z;
CGAL_assertion (isDivisible(x,y));
unsigned long bin_x = getBinExpo(x.m());
unsigned long bin_y = getBinExpo(y.m());

Expand Down
14 changes: 0 additions & 14 deletions CGAL_Core/include/CGAL/CORE/BigRat.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,6 @@ namespace CORE {
return BigRat(n,d);
}

// Chee: 8/8/2004: need isDivisible to compile Polynomial<BigRat>
// A trivial implementation is to return true always. But this
// caused tPolyRat to fail.
// So we follow the definition of
// Expr::isDivisible(e1, e2) which checks if e1/e2 is an integer.
inline bool isInteger(const BigRat& x) {
return denominator(x) == 1; // AF: does that need canonicalize?
}
inline bool isDivisible(const BigRat& x, const BigRat& y) {
BigRat r;
r = x/y;
return isInteger(r);
}

/// BigIntValue
inline BigInt BigIntValue(const BigRat& br)
{
Expand Down

0 comments on commit 6da4e7a

Please sign in to comment.