mirror of https://github.com/CGAL/cgal
remove non-used functions
This commit is contained in:
parent
2504625683
commit
6da4e7a57f
|
|
@ -513,32 +513,6 @@ inline long minStar(long m, long n) {
|
||||||
}
|
}
|
||||||
/// \name Functions for Compatibility with BigInt (needed by Poly, Curves)
|
/// \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
|
/// div_exact(x,y) returns the BigFloat quotient of x divided by y
|
||||||
/** This is defined only if isDivisible(x,y).
|
/** This is defined only if isDivisible(x,y).
|
||||||
|
|
@ -551,7 +525,6 @@ inline bool isDivisible(double x, double y) {
|
||||||
// normalizing it then we get zero.
|
// normalizing it then we get zero.
|
||||||
inline BigFloat div_exact(const BigFloat& x, const BigFloat& y) {
|
inline BigFloat div_exact(const BigFloat& x, const BigFloat& y) {
|
||||||
BigInt z;
|
BigInt z;
|
||||||
CGAL_assertion (isDivisible(x,y));
|
|
||||||
unsigned long bin_x = getBinExpo(x.m());
|
unsigned long bin_x = getBinExpo(x.m());
|
||||||
unsigned long bin_y = getBinExpo(y.m());
|
unsigned long bin_y = getBinExpo(y.m());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -67,20 +67,6 @@ namespace CORE {
|
||||||
return BigRat(n,d);
|
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
|
/// BigIntValue
|
||||||
inline BigInt BigIntValue(const BigRat& br)
|
inline BigInt BigIntValue(const BigRat& br)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue