actually, i want to calculate 2^60000 in 1 second. i have tried a way but it is giving output in specified time for 1000 power only.(i have used arrays to store a one integer).
will you please give me a hint only how to do that ?
"I AM NOT ASKING FOR THE CODE TO YOU, JUST A ALGORITHM OR A START UP TO DO THAT"
gourav1
-12
Posting Whiz in Training
Recommended Answers
Jump to PostYou could try a sort of divide-and-conquer approach and exploit the properties of multiplication.
Think about this:
2^16 2^8 * 2^8 2^4 * 2^4 2^2 * 2^2
Where you divide the problem into something that is more manageable. Due to the symmetry of the products, solving …
Jump to PostFirst off, I'm not sure, OK?
For smaller numbers, I'd suggest looking into bit shifting, and how each shift leftward, multiplies by 2. Bit shifting is among the fastest operations on a computer, in C.
00000001 = 1
00000010 = 2
00000100 = 4
etc.But your …
Jump to PostWell, I wasn't sure when I first read your initial post, but now, I'm pretty sure. See if this example doesn't stir up some zing for you:
I want to find 2^2. (It is frequently best to tackle a big thing, by first studying a smaller example of it).
…
All 9 Replies
asrockw7
18
Junior Poster in Training
Adak
419
Nearly a Posting Virtuoso
gourav1
-12
Posting Whiz in Training
Adak
419
Nearly a Posting Virtuoso
gourav1
-12
Posting Whiz in Training
Adak
419
Nearly a Posting Virtuoso
histrungalot
32
Junior Poster
gourav1
-12
Posting Whiz in Training
TrustyTony
888
pyMod
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.