handle random on big ints (jan burse)

This commit is contained in:
Vítor Santos Costa 2013-01-14 09:56:25 +00:00
parent 48ea1f5ec5
commit 0c9342466b

View File

@ -689,7 +689,7 @@ eval1(Int fi, Term t) {
return Yap_ArithError(TYPE_ERROR_INTEGER, t, "random(%f)", FloatOfTerm(t));
case big_int_e:
#ifdef USE_GMP
return Yap_ArithError(TYPE_ERROR_INTEGER, t, "random(%f)", FloatOfTerm(t));
return Yap_gmp_mul_float_big(Yap_random(), t);
#endif
default:
RERROR();