Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Log2b Binary Search Cost

  • 07-01-2015 12:37AM
    #1
    Registered Users, Registered Users 2 Posts: 8


    Not sure if this is maths or computing but anyways, I am studying advanced databases and I am doing a question on indexes. Can someone please tell me how this log thing works on a calculator?
    I missed the class and now I have an exam on this.

    I am looking at the solution and it says Log2b = Log23000 = 12
    how do I get this?

    When I put in log23000 in calculator I get 4.3617...

    Please help explain how I do this on calculator?

    Thank You


Comments

  • Registered Users, Registered Users 2 Posts: 6,167 ✭✭✭ZENER


    log base 2 of 3000 is 11.55. Does that make sense ? It's as close to 12 as I can find.

    Ken


  • Registered Users, Registered Users 2 Posts: 8 mardigra_xo


    Ye thats what it would be but how do you do it on the calculator?

    Thanks


  • Registered Users, Registered Users 2 Posts: 6,167 ✭✭✭ZENER


    Math's isn't my thing but in logs 11.55 is a long way from 12 using log base 2. log base2 of 4000 is closer to 12. Is there anyone else on your coarse who could help you ?

    What model is your calculator ?

    Ken


  • Registered Users, Registered Users 2 Posts: 774 ✭✭✭maki


    You need to divide the log10 of the required value by log10 of the required base.

    In your case: log10(3000) / log10(2)


  • Registered Users, Registered Users 2 Posts: 8 mardigra_xo


    I just saw a video on youtube there he does this

    log2 3000 = x (the 2 is log to the power of 2)
    2x = 3000 (the x is 2 to the power of x)

    so closest I could get was 11.55 = 2998

    so thats where the 12 is coming from he wants it rounded to nearest whole number.

    I have a sharp el-w531 but might be easier to do it that way than the calculator lol

    Im not the best at maths myself especially when I miss the classes but once explained to me its all good


  • Advertisement
Advertisement