3

This is how to find the base needed for any integer value p, where p>=5, such that the logarithm always equals e in python.

log(p, e**(log(p, e**e))) # equals e

Doesn't do anything besides that but this is another identity isn't?

Comments
  • 0
    Also e**(log(e, e**e)) = 1.444667861009766

    and

    e**1.444667861009766

    converges on e

    if you do

    e^√1.444667861009766

    e^√√1.444667861009766

    e^√√√1.444667861009766

    etc.

    while log(e, 1.444667861009766) = e
  • 1
    is e the euler e?
  • 0
    @stop

    2.718281828459045

    why you ask?
  • 0
    @Wisecrack just an help for my thoughts
  • 0
    @stop you a mathmatician or familiar with math?

    Also, another nifty thing:

    (√pi+1)/2 = 1.386226925452758

    and

    1.386226925452758**0.57721 =

    1.2071067811865475

    the 0.57721 is a truncation of omega.

    now

    (√2+1)/2 =

    1.2071067811865475

    and

    1.2071067811865475*2 = 2.414213562373095

    which gives you the silver ratio.

    I got 1.386226925452758 from

    √π^(1/√π)
  • 1
    i know a bit about formulars and how to bring x into one side, since it was a very important part in school, but its my first time with log, but i rember a thing.
  • 0
    @stop

    Then you still know more than me.

    Logs are the reverse of the exponent. You know base 2 vs base 10?

    I think it's like that, only you can have any base.
  • 1
    @Wisecrack i am near the solution.
  • 0
    @stop

    Have you practiced your maniacal laughter?
  • 0
    Im trying to get 10^e out of the log10.
  • 0
    @stop

    it's cool. struggled with this shit at first too.

    log(10) = 2.302585092994046

    e^2.302585092994046 = 10

    e is the 'base' of your logarithm.

    Doesn't really explain it. Just know that

    You do ln(n) or log(n) = m

    and to get your number 'back out'

    you do.

    e^m = n
  • 0
    I have log10(10^e+x). If i get it out. Its solved.
  • 0
    @stop

    The base of the outer log is e**(log(p, e**e))

    And the base of the inner log is e**e.

    Only works for those bases.
  • 2
    @Wisecrack I haven't checked what you're doing, but I can tell you that if your expression works, it can be adapted any base of the logarithm:
    log_a (b) = log_c (b) / log_c (a)

    Look up logarithm base change for the proof
  • 0
    @endor

    Yeah just noticed that.

    I wish I just had a list of identities instead of wasting time making shite half baked wheels.
  • 1
    @Wisecrack just look up the properties of logarithms
  • 1
    Also I just checked the expression you mentioned at the beginning, it is indeed an identity.
    You can see that once you figure out that log(p, e^e) = ln(p)/(e * ln(e)) = ln(p)/e
  • 0
    @endor holyshit, endor, you know your brilliant right?

    So what is this maybe useful for?

    Is it something new or previously known?
  • 1
    @Wisecrack I'm no genius, I just studied calculus xD.
    Exercises like this one (applying the properties of exponentiation/logarithms to evaluate expressions or solve equations) are the first thing you do when studying the topic.
    You can find many more like this one in any textbook with exercises - you should try them!

    Your expression, in this case, can be simplified in the following way:
    log(p, e^(ln(p) / e)) = log(p, p^(1/e))
    So p^(1/e) is the base such that log(p, p^(1/e)) = e. This is your original problem statement, and also a slightly more complicated definition of a logarithm.

    And if you apply the base change property to that, you'll find:
    log(p, p^(1/e)) = ln(p) / ln(p^(1/e)) = ln(p) / (1/e * ln(p)) = e

    So, in a very roundabout way, I guess you did what the people who write excercises do: you started from a known identity (log(p, p^(1/e))), applied different properties multiple times, and worked your way up to a more complex expression.
    And I had fun solving it :D
  • 1
    Also I have no idea where you got the p>=5 thing, the analytical expression holds true for any real number p>0. I'm guessing some floating point error got big enough to turn the comparison with e to false?

    When evaluating more complex expressions like this one, you typically don't want to do a direct comparison (x == e), but to check if the error is below a small enough threshold (x - e <= 1e-10).
    Assuming the numbers you're working with are large enough compared to your threshold, this is an easy way to avoid getting screwed by floats.
  • 1
    @endor minor errata: the known identity you started from is: log(p, p^(1/e)) = e
  • 1
    Could you stop with your shit at least once?
  • 1
    @nitwhiz no. I'm like a kid who just got a new toy.
  • 1
    @endor btw I want to thank you endor because had you not mentioned the floating point errors in exponentiation I wouldn't have thought to check for them in my current code.
Add Comment