示例#1
0
Integer power(const Integer& base, unsigned long exponent) {
	//TODO without backend
	Integer result;
	mpz_pow_ui(result.backend().data(), base.backend().data(), exponent);
	return result;
}
示例#2
0
Integer factorial2(unsigned long n) {
	Integer result;
	mpz_2fac_ui(result.backend().data(), n);
	return result;
}