bug-gmp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why is there no mpz_pow function?


From: Nick Savchenko
Subject: Why is there no mpz_pow function?
Date: Fri, 16 Jul 2004 23:31:57 +0300
User-agent: Gnus/5.090024 (Oort Gnus v0.24) Emacs/22.0.0 (gnu/linux)

Hello.

I have gmp-4.3.1 installed on Gentoo Linux (x86 processor). According to
the info page, there are such integer exponentiation functions in gmp.

void mpz_powm (mpz_t ROP, mpz_t BASE, mpz_t EXP, mpz_t MOD)
void mpz_powm_ui (mpz_t ROP, mpz_t BASE, unsigned long int EXP, mpz_t MOD)
void mpz_pow_ui (mpz_t ROP, mpz_t BASE, unsigned long int EXP)
void mpz_ui_pow_ui (mpz_t ROP, unsigned long int BASE, unsigned long int EXP)

But there is no function which simply raises BASE (which has mpz_t
type) to EXP (which has also mpz_t type). I need such function in my
program. Maybe there are some ways to raise long numbers to long
exponents without such function? But if there's no such way, what are
the objections to add such function to gmp library?

--
Regards,
Nick




reply via email to

[Prev in Thread] Current Thread [Next in Thread]