diff --git a/C/arith1.c b/C/arith1.c index dfedb3784..3b0b0ce68 100755 --- a/C/arith1.c +++ b/C/arith1.c @@ -207,7 +207,9 @@ eval1(Int fi, Term t) { case double_e: RFLOAT(-FloatOfTerm(t)); case big_int_e: +#ifdef USE_GMP return Yap_gmp_neg_big(t); +#endif default: RERROR(); } diff --git a/C/arith2.c b/C/arith2.c index a00aa5911..d3b11b8e9 100755 --- a/C/arith2.c +++ b/C/arith2.c @@ -161,10 +161,10 @@ p_rem(Term t1, Term t2) { static Term p_rdiv(Term t1, Term t2) { +#ifdef USE_GMP switch (ETypeOfTerm(t1)) { case (CELL)double_e: return Yap_ArithError(TYPE_ERROR_INTEGER, t2, "rdiv/2"); -#ifdef USE_GMP case (CELL)long_int_e: switch (ETypeOfTerm(t2)) { case (CELL)long_int_e: @@ -179,12 +179,10 @@ p_rdiv(Term t1, Term t2) { case (CELL)big_int_e: /* I know the term is much larger, so: */ return Yap_gmq_rdiv_int_big(IntegerOfTerm(t1), t2); -#endif default: RERROR(); } break; -#ifdef USE_GMP case (CELL)big_int_e: switch (ETypeOfTerm(t2)) { case long_int_e: @@ -197,12 +195,14 @@ p_rdiv(Term t1, Term t2) { default: RERROR(); } -#endif default: RERROR(); } zero_divisor: return Yap_ArithError(EVALUATION_ERROR_ZERO_DIVISOR, t2, "X is mod 0"); +#else + RERROR(); +#endif }