compile without gmp
This commit is contained in:
parent
247d59f0ef
commit
ab84319604
@ -207,7 +207,9 @@ eval1(Int fi, Term t) {
|
|||||||
case double_e:
|
case double_e:
|
||||||
RFLOAT(-FloatOfTerm(t));
|
RFLOAT(-FloatOfTerm(t));
|
||||||
case big_int_e:
|
case big_int_e:
|
||||||
|
#ifdef USE_GMP
|
||||||
return Yap_gmp_neg_big(t);
|
return Yap_gmp_neg_big(t);
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
RERROR();
|
RERROR();
|
||||||
}
|
}
|
||||||
|
@ -161,10 +161,10 @@ p_rem(Term t1, Term t2) {
|
|||||||
|
|
||||||
static Term
|
static Term
|
||||||
p_rdiv(Term t1, Term t2) {
|
p_rdiv(Term t1, Term t2) {
|
||||||
|
#ifdef USE_GMP
|
||||||
switch (ETypeOfTerm(t1)) {
|
switch (ETypeOfTerm(t1)) {
|
||||||
case (CELL)double_e:
|
case (CELL)double_e:
|
||||||
return Yap_ArithError(TYPE_ERROR_INTEGER, t2, "rdiv/2");
|
return Yap_ArithError(TYPE_ERROR_INTEGER, t2, "rdiv/2");
|
||||||
#ifdef USE_GMP
|
|
||||||
case (CELL)long_int_e:
|
case (CELL)long_int_e:
|
||||||
switch (ETypeOfTerm(t2)) {
|
switch (ETypeOfTerm(t2)) {
|
||||||
case (CELL)long_int_e:
|
case (CELL)long_int_e:
|
||||||
@ -179,12 +179,10 @@ p_rdiv(Term t1, Term t2) {
|
|||||||
case (CELL)big_int_e:
|
case (CELL)big_int_e:
|
||||||
/* I know the term is much larger, so: */
|
/* I know the term is much larger, so: */
|
||||||
return Yap_gmq_rdiv_int_big(IntegerOfTerm(t1), t2);
|
return Yap_gmq_rdiv_int_big(IntegerOfTerm(t1), t2);
|
||||||
#endif
|
|
||||||
default:
|
default:
|
||||||
RERROR();
|
RERROR();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#ifdef USE_GMP
|
|
||||||
case (CELL)big_int_e:
|
case (CELL)big_int_e:
|
||||||
switch (ETypeOfTerm(t2)) {
|
switch (ETypeOfTerm(t2)) {
|
||||||
case long_int_e:
|
case long_int_e:
|
||||||
@ -197,12 +195,14 @@ p_rdiv(Term t1, Term t2) {
|
|||||||
default:
|
default:
|
||||||
RERROR();
|
RERROR();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
default:
|
default:
|
||||||
RERROR();
|
RERROR();
|
||||||
}
|
}
|
||||||
zero_divisor:
|
zero_divisor:
|
||||||
return Yap_ArithError(EVALUATION_ERROR_ZERO_DIVISOR, t2, "X is mod 0");
|
return Yap_ArithError(EVALUATION_ERROR_ZERO_DIVISOR, t2, "X is mod 0");
|
||||||
|
#else
|
||||||
|
RERROR();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user