Wednesday, August 06, 2008

log calculator

My son has written a program to calculate the logarithm using any base. Be careful of splinters!
The log base

of




For more stuff about logarithms see my posts:
log base 2 and double, double toil and trouble. And of course, don't forget Wikipedia.

Labels: , ,

Bookmark and Share

150 Comments:

Blogger Zeno said...

Nice work, Adam!

3:34 PM, August 06, 2008  
Anonymous Anonymous said...

Helpful little app!

8:23 PM, October 18, 2008  
Blogger Andy said...

this is awesome!

12:42 AM, December 21, 2008  
Blogger Nick Barrowman said...

Glad to hear you like it. Cheers!

8:54 AM, December 21, 2008  
Anonymous Anonymous said...

Thanks for writing this, just used it for my CS homework :)

11:01 PM, January 26, 2009  
Anonymous Anonymous said...

as did i? uc berkeley anyone?

11:16 PM, January 26, 2009  
Anonymous Anonymous said...

pbm with big numbers?

The log base 2 of 576460752303423486,5 is NaN

8:52 AM, February 20, 2009  
Blogger Nick Barrowman said...

Actually, the problem is with the comma. The program only understands a dot as a decimal mark.

10:30 AM, February 20, 2009  
Anonymous Anonymous said...

Thanks man, i almost forgot everything... This is really helpful for my work... I tird to use exel but not working....Cheers man...

4:20 AM, February 23, 2009  
Anonymous Conor said...

very helpful, thanks

9:15 PM, February 24, 2009  
Blogger Nick Barrowman said...

Glad to hear it.

9:38 PM, February 24, 2009  
Anonymous Anonymous said...

Thanks dude, Appreciate your help !

1:27 AM, March 28, 2009  
Anonymous Anonymous said...

Thank you! i luv u

-Vinila

6:20 PM, April 13, 2009  
Anonymous Anonymous said...

Just used it for my CS Assignment. Thanks!!

10:58 PM, April 23, 2009  
Anonymous Anthony Leotta said...

great calculator, it was easy to use than my son's TI-84 Plus

11:35 PM, April 29, 2009  
Anonymous Anonymous said...

Great app, so useful, fair play to you for going to the trouble of posting it.

Thanks a million from Ireland :)

8:55 AM, May 07, 2009  
Anonymous Anonymous said...

thumps up!

4:47 AM, May 17, 2009  
Blogger Yan said...

I am impressed. But an improvement could be made in the way it processes the "of" input field. I entered 311.1/440 and it didn't work. I have to make this division myself and enter the result. If you can fix this then it will be the awesomest ;)

12:24 PM, May 29, 2009  
Anonymous Anonymous said...

Thanks!

6:29 PM, June 11, 2009  
Anonymous Anonymous said...

this copyright thing in your program is hilarious..

11:38 PM, June 21, 2009  
Anonymous Anonymous said...

Nice one. its very helpful
Thanks

10:38 AM, June 23, 2009  
Anonymous Anonymous said...

I can't believe you put a copyright inside the alert window... that has to be a joke

3:19 PM, August 31, 2009  
Anonymous lakshmi said...

great help..... thanks alot...

9:54 PM, September 01, 2009  
Anonymous Anonymous said...

thanks a lot man!

8:34 PM, October 06, 2009  
Anonymous Anonymous said...

you are a life saver!!!

1:32 PM, October 28, 2009  
Anonymous Anonymous said...

Thanks......this is very helpful!

3:42 PM, November 29, 2009  
Anonymous Anonymous said...

quite helpful indeed, thanks!

10:05 PM, December 07, 2009  
Anonymous Anonymous said...

Thanks a bunch.

3:33 PM, December 13, 2009  
Anonymous Anonymous said...

thanks! this is super useful!

5:06 PM, December 16, 2009  
Anonymous Anonymous said...

aweome!!thanks a lot....

1:37 AM, January 25, 2010  
Anonymous Anonymous said...

It didnt work for me. The answer it gave me in NaN

3:01 AM, February 03, 2010  
Blogger Nick Barrowman said...

Not sure what the problem there would be. I just tried it and it worked fine. What numbers did you use?

9:37 AM, February 03, 2010  
Anonymous Anonymous said...

why no fractions??
tried log(7/8)

7:59 PM, February 15, 2010  
Anonymous Anonymous said...

very nice

8:04 PM, February 17, 2010  
Anonymous Anonymous said...

Nice! I was looking for a quick and dirty Log Base 2 Calculator! Thanks!

12:46 AM, February 23, 2010  
Anonymous Anonymous said...

A Great Help....Thanks

3:58 AM, February 25, 2010  
Anonymous zohaib hassan said...

Thanks ......very help.......

7:19 AM, March 13, 2010  
Anonymous ALI AKRAM said...

HANDY AND ACTS AS PORTABLE DEVICE VERY USEFUL AND NICE !!

10:13 AM, March 13, 2010  
Anonymous Anonymous said...

WOW!!! THANKS SO MUCH! I FORGOT MY CALCULATOR THE DAY BEFORE A HUGE MATH TEST! I WAS FRANTIC...
YOUR PROGRAM DESIGN HELPED ME TONS!!!!!

I'M REALLY INTERESTED ON EXACTLY HOW YOU PROGRAM!
HTML...

7:28 PM, March 17, 2010  
Anonymous Anonymous said...

GRACIAS POR LA CALCULADORA...
ES MUY UTIL!!!!!

7:33 PM, March 17, 2010  
Anonymous Anonymous said...

thank you very much

10:03 PM, March 23, 2010  
Anonymous fahad munawar said...

thanx boss it helped me

3:47 AM, March 28, 2010  
Anonymous Anonymous said...

Thank you..

5:53 AM, April 14, 2010  
Anonymous Anonymous said...

Thank you so MUCH! I coundnt figure out why the minumum worst case for my binary search algorithms was not coming out correct, thanks again.

9:31 PM, April 18, 2010  
Blogger Amila said...

Great work !
Really helpful

12:03 AM, April 22, 2010  
Anonymous z said...

used this for my math homework, ty

10:49 PM, May 12, 2010  
Blogger Rahul said...

good one, very helpful

12:16 AM, June 22, 2010  
Blogger IceMan said...

Thanks alot for such a nice application..Good Work
Jawad Hussain

9:59 AM, June 26, 2010  
Blogger Grant said...

Hey, it's still going strong! I just used it - again.

Thanks for a real handy app.

Grant

4:56 PM, August 07, 2010  
Anonymous Anonymous said...

helped alot, thanks!

10:28 AM, September 08, 2010  
Blogger JROD said...

Just used it for some telecom throughput calculations, thanks!

1:39 PM, September 08, 2010  
Anonymous Anonymous said...

Landed on this page through google search.

Glad it helped me in my calculation.

Thanks

7:40 PM, September 16, 2010  
Anonymous Anonymous said...

How did you program the calculator

6:06 AM, October 09, 2010  
Anonymous Anonymous said...

nice and very helpfull,,,,
awsome creation,,,,

7:09 AM, October 17, 2010  
Anonymous Anonymous said...

A very applicatiion..
looks small but works more..


ChiRan

8:40 AM, October 25, 2010  
Anonymous Anonymous said...

Thanks alot, nice and simple, and a great help!

8:05 PM, November 05, 2010  
Anonymous Anonymous said...

I like this calculator thank for helping me

9:25 PM, November 30, 2010  
OpenID arusip said...

Thank for this. I'm using it for my work :)

9:04 PM, December 05, 2010  
Anonymous Anonymous said...

I use this all the time for homework. I've written a small Java function that does this as well:

public static double log2(double num){
return(Math.log(num)/Math.log(2));
}

4:25 PM, December 09, 2010  
Blogger Nick Barrowman said...

Thanks, Anonymous!

7:49 AM, December 21, 2010  
Blogger BILI said...

Very Helpful and Simple to use. Thanks

9:46 AM, January 05, 2011  
Anonymous Anonymous said...

there is limit for double

9:30 PM, January 24, 2011  
Anonymous Anonymous said...

lame, what about log_2 ½ ?

6:16 AM, February 05, 2011  
Anonymous Ahmed Masud said...

helped me I was about to make my own code but then found this one
Thanks again for saving my time

11:10 AM, February 08, 2011  
Anonymous Anonymous said...

log base 1 of 1 appears to be NaN...

2:41 AM, February 14, 2011  
Anonymous Nikola said...

"log base 1 of 1 appears to be NaN..."
That's how it should be. The answer is indeterminate in mathematics.

7:59 AM, March 11, 2011  
Blogger daski__86 said...

thx alot :P

3:32 PM, March 13, 2011  
Anonymous Anonymous said...

Thx :)

2:24 AM, March 17, 2011  
Anonymous Anonymous said...

Crazy how many times I've come here and used this! Really is quite useful - much quicker than finding my old scientific calculator which is gathering dust somewhere. Thanks!

10:40 AM, March 22, 2011  
Anonymous Full latest pc games links said...

Hi ,I use this all the time for homework. I've written a small Java function that does this as well, my blog usagamezone.blogspot.com

7:12 PM, April 22, 2011  
Blogger Ruchir said...

Thanks dear

10:20 AM, May 07, 2011  
Blogger Mani said...

Great work man!!!

7:56 AM, May 29, 2011  
Anonymous Pranjal said...

Hey , How is log .532= -0.274 ?
The characteristic is -1 and mantissa is 7259
When we combine them we get -1.7259
Pleasse hellllppppppp !

7:38 AM, June 12, 2011  
Anonymous Anonymous said...

@Pranjal
Your characteristic is negative, but your mantissa is still positive. -1 + 0.726 = -0.274

10:35 AM, August 16, 2011  
Anonymous Anonymous said...

Thanks

3:30 AM, August 19, 2011  
Anonymous katrina kaif said...

nice post thanks admin see my blog
katrina-k.blogspot.com have latest news of hot katrina kaif
photo, gallery, videos, upcomming film new, biography even everything what you need to know about her character.

11:09 AM, September 08, 2011  
Anonymous Anonymous said...

Thanks

9:50 PM, September 22, 2011  
Anonymous Anonymous said...

You saved my life for my motor learning assignment at BSU... Thanks, Bro!

8:01 PM, September 25, 2011  
Anonymous Anonymous said...

Thanks

12:47 AM, October 02, 2011  
Anonymous Anonymous said...

Well done!

6:33 PM, October 02, 2011  
Anonymous Nand said...

Thanks a ton Adam, it helped me a lot :)
cute li'l app :)

12:14 AM, October 07, 2011  
Anonymous Anonymous said...

Not Good, the answer is always NaN

3:52 AM, October 10, 2011  
Anonymous Anonymous said...

Hello Mr Nick....HELP!! see calcuation below:

10-6 : 229 ;216
10-7 : 20 ;17
N : 7,05

What is the formula to calculate N? I would be most grateful if you could assist :-)

5:36 AM, October 11, 2011  
Anonymous Sam said...

Excellent little calculator. I saved it to my delicious.com account.

Thank you!

11:55 PM, October 17, 2011  
Anonymous Anonymous said...

Thanks for this!

1:08 AM, October 26, 2011  
Anonymous Anonymous said...

This is so helpful. Thanks!

10:29 PM, November 17, 2011  
Anonymous pavan said...

good work

11:19 AM, November 18, 2011  
Anonymous GK said...

sounds good, BUT there are other simple methods

to calculate log base 2 for x

calculate log x / log 2

this is the answer...

8:17 PM, November 20, 2011  
Anonymous Faisalabad Photographer said...

Wow it is great calculator. thanks so much.

4:09 PM, November 25, 2011  
Anonymous Anonymous said...

not bad

6:04 PM, December 05, 2011  
Anonymous Anonymous said...

Nice!!!

9:34 AM, December 08, 2011  
Anonymous Anonymous said...

Great!

3:45 PM, December 18, 2011  
Anonymous Anonymous said...

Thank you!!! This app is wonderful although I still have no idea how to work out the equation myself at least I got through the first 8 using this app. Good job!!

3:25 PM, December 24, 2011  
Anonymous Anonymous said...

great :)

4:17 AM, January 07, 2012  
Blogger KK said...

this is cool. good job.

but make the result appear in another box than in a dialog.

also, strip out spaces from the number fields

4:23 PM, January 11, 2012  
Anonymous Anonymous said...

Thanks!

11:15 AM, January 15, 2012  
Anonymous Anonymous said...

thanks, good for checking my work.

11:38 PM, January 24, 2012  
Anonymous Anonymous said...

Can anyone help me with what this exact number means 1.5E-002? Does it mean 0.15 or 0.015? Thanks

2:08 PM, January 31, 2012  
Anonymous Anonymous said...

0.015.

Gràcies, molt útil.

2:30 PM, February 09, 2012  
Anonymous Anonymous said...

hey guys can you help me with log2 of 5^4

2:52 PM, February 14, 2012  
Anonymous Anonymous said...

Does anyone know how to use this on a calculator?

10:34 PM, March 04, 2012  
Anonymous Anonymous said...

This helped a lot! Thanks :)

1:03 AM, March 06, 2012  
Anonymous Anonymous said...

Thanks so much for this!!! It's saving me in Algebra 2 :) <3

1:20 AM, March 14, 2012  
Blogger rash said...

very helpful :) thanks

11:11 PM, April 04, 2012  
Anonymous Anonymous said...

Fantastic tool...thanks :)

1:55 AM, May 02, 2012  
Anonymous Anonymous said...

Very much helpful....great effort to be acknowledged... :) :) <3

6:35 AM, May 05, 2012  
Anonymous Anonymous said...

Excellent, it works well for base of non integer values also.

8:02 AM, May 14, 2012  
Anonymous Anonymous said...

Thanks!

7:13 PM, June 17, 2012  
Anonymous Anonymous said...

SO HELPFUL! Thanks a lot!

8:57 PM, July 04, 2012  
Anonymous Anonymous said...

does anyone know a program in c++ for finding a log to any base for any number without using math.h library?????? please helppp meeee.thanx in advance.

10:17 AM, July 18, 2012  
Anonymous estudent said...

it is very simple. if u can use only log.. then base is not issue.. simply take log(number_required_for_solving)/log(base)=answer :) .if can not use log fuction.. then be brave and make log function and use this algo by calling your function.

2:39 AM, August 14, 2012  
Anonymous Anonymous said...

How does this calculator work? Do you have to take a log base 10 and divide it by log of input number? meaning:
log(input2)/log(input1)= the answer?

input 1 is the one on the top "log base"
input 2 is the one on the bottom "of.."
Is that close to what you did?

6:58 PM, September 18, 2012  
Anonymous Anonymous said...

beats google calculator, says a professor. thanks for the simple app.

11:41 AM, October 09, 2012  
Anonymous Anonymous said...

Thanks a lot

10:42 PM, October 21, 2012  
Anonymous Anonymous said...

+log/2 of 2
:-)

3:25 AM, November 14, 2012  
Anonymous Anonymous said...

Awesome! Please tell your son thank you for me!

10:54 PM, November 30, 2012  
Anonymous Anonymous said...

ty man, helpful

4:14 AM, December 03, 2012  
Anonymous Anonymous said...

Thanks, it was quick search & use ..

12:49 AM, December 18, 2012  
Anonymous Anonymous said...

Took me a while to figure out the background... calculators... timber? ohh It is a LOG! lol cute ;p

8:24 PM, February 27, 2013  
Anonymous Anonymous said...

Helpful little tool !! Great Job !!

12:40 AM, March 06, 2013  
Anonymous Anonymous said...

Why is log base 1 of 1 NaN? Wouldn't it be one?

10:42 AM, June 13, 2013  
Anonymous Anonymous said...

Pfff i need the log_2 of (1-2x) deal with it

12:25 AM, June 14, 2013  
Anonymous Lankesh said...

Thank You. Proved useful to me too.. Cheers mate.. Happy coding.. \m/

5:17 AM, June 19, 2013  
Anonymous Anonymous said...

Thank you!!!

12:35 PM, July 08, 2013  
Blogger Glenn Simmons said...

Great app Cheers!

4:34 PM, August 19, 2013  
Anonymous Anonymous said...

Thank you man, helpful..

3:09 AM, September 01, 2013  
Anonymous Anonymous said...

Just used to calculate the maximum depth of a weighted union find tree

11:56 AM, September 01, 2013  
Anonymous Anonymous said...

It's good ! Only thing is it won't accept the fractions like 6/20 ,instead 0.3 has to be entered.It's just suggestion , but still so helpful. Thank You.

7:45 AM, September 24, 2013  
Blogger themryesterday said...

thanks alot bro :)

10:41 AM, October 01, 2013  
Anonymous Anonymous said...

I have used this many times now.

9:28 PM, October 04, 2013  
Blogger David Adelani said...

Great work

6:35 PM, October 10, 2013  
Blogger Unknown said...

Thank you! I'm taking a Geology class right now and we're dealing with half life equations. It's been about a decade since I've dealt with this kind of math and I couldn't for the life of me figure out how to even do this on my calculator.

12:04 PM, November 01, 2013  
Anonymous Anonymous said...

amazing work :)

8:57 AM, November 12, 2013  
Anonymous Anonymous said...

Awesome! This is a helpful lifesaver! I just used this for my Trigonometry and pre-calculus lesson.

7:34 PM, November 15, 2013  
Blogger Sergio González said...

Awesome!

5:38 AM, November 26, 2013  
Anonymous Anonymous said...

Great job! Awesome! You saved my day! You are a real lifesaver! You saved the world!

1:27 AM, December 12, 2013  
Anonymous Anonymous said...

You're Awesome!
Thanks man.

12:12 PM, December 19, 2013  
Blogger Freedownloadfullversion93 said...

kgk

7:48 AM, December 29, 2013  
Blogger Kalle jõgeva said...

Big thx :) student in Tallinn University of Technology

5:31 PM, January 07, 2014  
Blogger Stew said...

Showing nephew how numbers are awesome and mysterious, I ran across this online. Made his day full of smiles ( he's five). Thanks!

1:51 PM, January 25, 2014  
Blogger Stratos said...

I have been using this everyday since I found it!

4:55 PM, February 06, 2014  
Anonymous Anonymous said...

Nice!!!! Now if we could implement fractions into the input.

11:14 AM, March 31, 2014  
Anonymous Anonymous said...

For those who do not use a calulator...
put this into your calulator if you if your calulator does not have a log base 2 button....
(log(what ever number you want)/log(2))
You can sub in any number you want for the top or the bottom really

5:54 PM, April 06, 2014  
Anonymous Anonymous said...

Thank you so much

3:36 AM, May 04, 2014  
Blogger José Agustín Navarro Acosta said...

Excellent work, very usefull Nick.

Regards from Mexico.

Psicology Student at Universidad de Guadalajara

7:52 PM, May 11, 2014  
Anonymous actatek38 said...

I found your website the other day and after reading a handful of posts, thought I would say thank you for all the great content.
Keep it coming! I will try to stop by here more often.To get new information visit here
actatek
time clock
biometric time clock

10:21 AM, May 25, 2014  
Blogger Anudeep Mujje said...

Nice Work Adam :) quite helpful

12:25 AM, June 05, 2014  
Blogger Eshak said...

Thank you ! <3

4:55 AM, June 06, 2014  
Anonymous aidensmith said...

Innovative work.. as we know that if we are doing accounting homework then it is very necessary. there are many online homework help organization are available who worked for helping student assignment problem in any subject.

4:36 AM, August 21, 2014  
Anonymous Anonymous said...

Excellent calculator, thank you so much!

10:39 PM, August 29, 2014  

Post a Comment

<< Home