Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

DZone's Guide to

# The Most Interesting Logs in the World

· Big Data Zone ·
Free Resource

Comment (2)

Save
{{ articles[0].views | formatCount}} Views

The open source HPCC Systems platform is a proven, easy to use solution for managing data at scale. Visit our Easy Guide to learn more about this completely free platform, test drive some code in the online Playground, and get started today.

I occasionally get a comments from people who see “log” in one of my posts and think “log base 10.” They’ll say they get a different result than I do and ask whether I made a mistake. So to eliminate confusion, let me explain my notation.

When I say “log,” I always mean natural log, that is, log base e. This is the universal convention in advanced mathematics. It’s also the convention of every programming language that I know of. If I want to use logarithms to a different base, I specify the base as a subscript, such as log10 for log base 10.

The reason logs base e are called natural, and the reason they’re most convenient to use, is that base e really is natural in a sense. For example, the function kx is its own derivative only when k = e. And the derivative of logk(x) is 1/x only when k = e.

All logarithms are proportional to each other. That is, logb(x) = loge(x) / loge(b). That’s why we can say something is logarithmic without specifying the base. So we might as well pick the base that is easiest to work with, and most people agree that’s base e. (There are some exceptions. In computer science it’s often convenient to work with logs base 2, sometimes written lg.)

Logarithms base 10 have the advantage that they’re easy to compute mentally for special values. For example, the log base 10 of a 1,000,000 is 6: just count the zeros. So it’s good pedagogy to introduce logs base 10 first. But natural logs are simpler to use for theoretical work, and just as convenient to compute numerically.

Along these lines, when I use trig functions, I always measure angles in radians. Just like all advanced mathematics and all programming languages.

As with natural logs, radians are natural too. For example, the derivative of sine is cosine only when you work in radians. If you work in degrees, you pick up a proportionality constant every time you differentiate a trig function.

Natural logs and radian measure are related: Euler’s formula eix = cos(x) + i sin(x) assumes the base e and assumes that x measured in radians.

Managing data at scale doesn’t have to be hard. Find out how the completely free, open source HPCC Systems platform makes it easier to update, easier to program, easier to integrate data, and easier to manage clusters. Download and get started today.

Topics:

Comment (2)

Save
{{ articles[0].views | formatCount}} Views

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.