06-26-2015 01:35 AM
@Jordan_M wrote:
Here is an example that calculates m^n for large numbers. It is based on the suggestions posted above. It only works with bases up to 4*10^9..
So, it it supposed to work for the problem in post 1? Seems to give the wrong result.
06-26-2015 01:51 AM - edited 06-26-2015 01:52 AM
Seems my old code from the N'th root challenge seems to work just fine. It uses the exponentiation by squaring method.
Looking at it, it could be made much more efficient. 😉
06-26-2015 03:35 AM - edited 06-26-2015 03:42 AM
Hi everyone,
thank you for answers and help, but it seems that I really have Super Bug in my brain because I still did not manage to get this thing going and I still don't see the way how I can use that big reusult (result is string) to use for further calculation of mod --> (982451653^15) mod 1287821 and I don't know what to do next...
06-26-2015 04:06 AM - edited 06-26-2015 04:06 AM
I'm curious about why you're trying to solve this problem. Is it a school assignment? Are you working on a real-world application with such large numbers? That'd be interesting. 😄 What is it? What is the physical significance of the calculation you're trying to perform? Inquiring minds want to know!
06-26-2015 04:09 AM - edited 06-26-2015 04:12 AM
@SuperbrainBug wrote:
[...] and I don't know what to do next...
I think someone has already said this.
06-26-2015 04:12 AM
It's a school assignment... I need to calculate that for diffie-hellman key exchange
06-26-2015 04:26 AM
06-26-2015 04:36 AM
Because we are communicating over serial port (VISA) with one ticket printer and ticket printer uses diffie-hellman key exchange
06-26-2015 05:29 AM
LabPython will work. All you need is the dll and OpenG's free library.
The modulo result I get is 156086. Is this what you expect?
06-26-2015 05:36 AM