Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
This function should work for you:
void mpf_pow_ui (mpf_t rop, mpf_t op1, unsigned long int op2)
yes, but here's the problem... the exponent is larger than it fits in unsigned long? You can try to calculate the degree through the exponent of the logarithm
As for the exponent of the logarithm, I got excited, I do not find suitable functions.
By the way, converting mpz to ui is not difficult at all:
unsigned long int mpz_get_ui (mpz_t op)
This is if, for example, for a report, it will be necessary to display intermediate calculations - in order to display the result of raising to a power without even taking the modulo. Although I don't think you need it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question