able to commit 64 bits

This commit is contained in:
Costa Vitor
2009-06-05 12:18:10 -05:00
parent 7e108201b0
commit 5e4be93491
4 changed files with 31 additions and 4 deletions

View File

@@ -362,6 +362,17 @@ Yap_gmp_exp_big_int(MP_INT *b, Int i)
return MkBigAndClose(&new);
}
Term
Yap_gmp_big_from_64bits(YAP_LONG_LONG i)
{
char s[64];
MP_INT new;
sprintf(s, "%lld", (long long int)i);
mpz_init_set_str (&new, s, 10);
return MkBigAndClose(&new);
}
#endif