Results 1 to 5 of 5
Like Tree1Thanks
  • 1 Post By emakarov

Math Help - What is the most economical method to "open", say, 3^4567?

  1. #1
    Newbie
    Joined
    Jan 2013
    From
    Europe
    Posts
    20

    What is the most economical method to "open", say, 3^4567?

    What kind is an algorithm which "opens" large natural base numbers with natural number exponents?
    Manually 3^5 is easy as it only demands 5 repetitive multiplications (3*3*3*3*3) in order to find precise answer (=243).
    But 3^4567 does not fit in screen of a typical calculator.
    Even if we use computers, they usually give us approximate values in the form of base number 10 exponents (like 1,56789 * 10^234; this is just an example what we can see in calculator or computer screen, not an real approximation of 3^4567).
    So, what I am looking for is an algorithm that gives precise values for these stupendously large numbers, not an approximative method.

    Is there any shorcut method, or does our computers actually just use raw power and repetitively multiply 3 4567 times in this example? As far as I know, Taylor series can be used in order to find precise enough decimal values for logarithms to be found, so that they can be used to "open", say, 3^4567 with the required precision...
    But does that calculation of appropriate Taylor series offers any advantage compared to raw repetitive multiplications?
    I do not know, but it is my guess that it does not.

    I am aware, and I apologize, that my question may sound like irritating to many MHF readers, but I have a certain application in my mind which requires answer to this question.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    Sep 2012
    From
    Australia
    Posts
    4,164
    Thanks
    762

    Re: What is the most economical method to "open", say, 3^4567?

    Hey kpkkpk.

    You might want to read how common computers store numbers, since it does the sort of things that you are trying to do:

    Floating point - Wikipedia, the free encyclopedia
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Jan 2013
    From
    Europe
    Posts
    20

    Re: What is the most economical method to "open", say, 3^4567?

    Thank you!
    From the source you showed to me I found a lot of information how precise computations are while performed by computers.
    Still I do not understand the real algorithm computer performs while it computes, say, 3^4567.
    If I measure time, and let computer to calculate (="open"), say, 3^13 and compare that time to another computation, say, 3^4567, I assume more time to have used in the latter example...so, obviously, some kind of a repetition there occurs inside these machines.
    Perhaps I should try to find an answer from some programming based forum instead?
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor
    Joined
    Sep 2012
    From
    Australia
    Posts
    4,164
    Thanks
    762

    Re: What is the most economical method to "open", say, 3^4567?

    You will have to get the algorithms the CPU uses for floating point calculations to answer your question.

    Look for open source large floating point libraries and look at look at the code.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    MHF Contributor
    Joined
    Oct 2009
    Posts
    5,561
    Thanks
    785

    Re: What is the most economical method to "open", say, 3^4567?

    Floating point arithmetic is something that should not be used to make precise calculations with big integers. See this thread where doing so leads to a misleading result. Many programming languages have libraries for arbitrary-precision integers. If I remember correctly, Scheme's regular integers can have arbitrary size, and Java has the BigInteger class.

    Taylor series are used for computing (approximations to) real values of functions that cannot be expressed using standard arithmetic operations, such as trigonometric functions and e^x and logarithms.

    A more economical way to compute 3^4567 than performing 4566 multiplications is to express 4567 in binary: 4567_{10} = 1000111010111_{2}, and compute the powers of 3 that correspond to 1's: 3^{2^0}, 3^{2^1}, 3^{2^2}, 3^{2^4}, 3^{2^6}, ..., 3^{2^8} and 3^{2^{12}}. The final result is the product of all these numbers. Note that subsequent powers of 3 are obtained from previous ones by squaring them: e.g., 3^{2^7} = \left(3^{2^6}\right)^2.
    Thanks from kpkkpk
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 2
    Last Post: April 2nd 2012, 08:06 PM
  2. Replies: 3
    Last Post: October 17th 2011, 03:50 PM
  3. Replies: 2
    Last Post: April 24th 2011, 08:01 AM
  4. Replies: 1
    Last Post: October 25th 2010, 05:45 AM
  5. "Find the volume of the largest open box.."
    Posted in the Calculus Forum
    Replies: 2
    Last Post: April 7th 2010, 05:37 PM

Search Tags


/mathhelpforum @mathhelpforum