Finding power for two large arguments

Torbjorn Granlund tg at gmplib.org
Thu Jan 16 12:34:23 UTC 2014


Emmanuel Thomé <emmanuel.thome at gmail.com> writes:

  On Thu, Jan 16, 2014 at 12:20 PM, Alexander Smirnov <axsmirnov at gmail.com> wrote:
  > However, I got 0 as a result and I think it because of modulo value.
  
  You think right. (10x)^a is zero mod 10^n as soon as a>=n.
  
  > Can I somehow got the result for c = a ^ b?
  
  Without the modulo you mean ? Depends on whether or not you can afford
  the 2.51*10^56 petabytes you would need to write the result.
  
Actually, one needs a few bits over 2.83*10^56 petabytes for the
suggested computation's result.  But you perhaps mean pebibytes?

(This mailing list is where you get your hands slapped.)


Torbjörn
Please encrypt, key id 0xC8601622


More information about the gmp-discuss mailing list