• Post Reply Bookmark Topic Watch Topic
  • New Topic

Log to the base 10?  RSS feed

 
Ivona Tinkle
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm doing a calculator project and I need to do "Log" (not knowing if they want to the base 2, 10 or whatever). Using .Math, I find a log function however it only does log to the base e(natural log)... what the?! Can someone please tell me how to get log to the base 10, or even better a log where you can choose what base you want to use.
~thanks~
 
Tim West
Ranch Hand
Posts: 539
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One of the fundamental properties of logarithms:

(all a, b, x). log_a b = (log_x b) / (log_x a)

You'll probably want x = e in the formula above, since you can do logs easily that way. Of course, all a, b, x must be > 0.

On a side note..."Ivona Tinkle" - is that a Simpsons reference or were your parents, ummm, taking the p!ss?


--Tim
 
Ivona Tinkle
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, and my name is actual Brett, I was just being smart (yes it was off the simpsons, though all the episodes kinda merge to one after a while).
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, Mr. Brett Tinkle, here at the Ranch we do have what we call our naming policy, which specifically prohibits this particular flavor of "being smart" (although we do encourage other kinds of smartness, and other kinds of having fun as well.) Please head over here and mend your ways, ASAP. Thanks, pardner. Hope to see you around the Ranch!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!