DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

The Most Interesting Logs in the World

John Cook user avatar by
John Cook
·
Nov. 20, 12 · Interview
Like (0)
Save
Tweet
Share
6.11K Views

Join the DZone community and get the full member experience.

Join For Free

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 log 10 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 k x is its own derivative only when k = e . and the derivative of log k ( x ) is 1/ x only when k = e .

all logarithms are proportional to each other. that is, log b ( x ) = log e ( x ) / log e ( 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 e ix = cos( x ) + i sin( x ) assumes the base e and assumes that x measured in radians.

Computer science IT Measure (physics) Advantage (cryptography) COS (operating system) Euler (software) POST (HTTP) Computer

Published at DZone with permission of John Cook, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Hidden Classes in Java 15
  • How Observability Is Redefining Developer Roles
  • Remote Debugging Dangers and Pitfalls
  • Taming Cloud Costs With Infracost

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: