[HN Gopher] The Lost Art of Logarithms
       ___________________________________________________________________
        
       The Lost Art of Logarithms
        
       Author : ozanonay
       Score  : 525 points
       Date   : 2025-03-13 19:05 UTC (1 days ago)
        
 (HTM) web link (www.lostartoflogarithms.com)
 (TXT) w3m dump (www.lostartoflogarithms.com)
        
       | tombert wrote:
       | I started using LMAX Disruptor for some projects. One quirk with
       | Disruptor is that the queue size always has to be an exponent of
       | two.
       | 
       | I wanted to make sure that I always have at least enough room for
       | any size and I didn't want to manually compute, so I wrote this:
       | var actualSize = Double.valueOf(Math.pow(2,
       | Math.ceil(Math.log(approxSize) / Math.log(2)))).intValue();
       | 
       | A bit much for a single line, but just using some basic log rules
       | in order to the correct exponent. I learned all this in high
       | school, but some of my coworkers thought I was using this
       | amazing, arcane bit of math that had never been seen before. I
       | guess they never use log outside of Big-O notation.
        
         | mananaysiempre wrote:
         | This is perfectly usable, of course, but I'd write
         | var actualSize = Integer.highestOneBit(approxSize - 1) << 1;
         | 
         | purely to avoid involving the horrors that live beneath the
         | humble pow() and log().
         | 
         | (Integer.highestOneBit, also known as "isolate leftmost bit",
         | "most significant one", or the like, essentially has to be a
         | primitive to be efficient, unlike its counterpart for the
         | lowest bit, x&-x. The actual CPU instruction is usually closer
         | to Integer.numberOfLeadingZeros, but that's just a bitshift
         | away.)
        
           | tombert wrote:
           | That's pretty cool; I didn't even consider doing any cool
           | bitwise arithmetic.
           | 
           | I didn't particularly care about performance or anything for
           | this particular case, since it runs exactly once at the start
           | of the app just to initiate the Disruptor.
        
           | markrages wrote:
           | shouldn't it be
           | 
           | var actualSize = 1 << Integer.highestOneBit(approxSize - 1);
           | 
           | ?
        
             | mananaysiempre wrote:
             | Nope. I don't know why the Java folks decided not to use
             | the fairly standard verb "isolate" for this method, but
             | that's what it is[1]:
             | 
             | > public static int highestOneBit(int i)
             | 
             | > Returns an int value with at most a single one-bit, in
             | the position of the highest-order ("leftmost") one-bit in
             | the specified int value. Returns zero if the specified
             | value has no one-bits in its two's complement binary
             | representation, that is, if it is equal to zero.
             | 
             | There isn't a straight floor(log2(*)) as far as I can tell,
             | only Integer.numberOfLeadingZeros, and turning the former
             | into the latter is annoying enough[2] that I wouldn't
             | prefer it here.
             | 
             | [1] https://docs.oracle.com/javase/8/docs/api/java/lang/Int
             | eger....
             | 
             | [2] https://docs.oracle.com/javase/8/docs/api/java/lang/Int
             | eger....
        
               | markrages wrote:
               | Thanks. What a weird API.
        
           | layer8 wrote:
           | The above gives an incorrect result for _approxSize_ = 1
           | (namely 0). The following works (for values up to 2^30, of
           | course):                   var actualSize = Integer.MIN_VALUE
           | >>> Integer.numberOfLeadingZeros(approxSize - 1) - 1;
           | 
           | Or, if you want 0 to map to 0 instead of to 1:
           | var actualSize = Integer.signum(approxSize) *
           | Integer.MIN_VALUE >>> Integer.numberOfLeadingZeros(approxSize
           | - 1) - 1;
           | 
           | Of course, you could also use a variation of:
           | var actualSize = Math.min(1,
           | Math.Integer.highestOneBit(approxSize - 1) << 1);
        
         | ajsnigrutin wrote:
         | Just shift the size to the right 1 bit and count the shifts
         | until the value turns to zero, and you'll get your number 2
         | exponent for the size :)
        
       | kenjackson wrote:
       | Notation for writing log has always bugged me. Like I feel like
       | it should be more like <10>^<527> which would be the log base 10
       | of 527. That's not it, but something. The current notation just
       | doesn't feel quite right.
        
         | Jtsummers wrote:
         | https://mathcenter.oxford.emory.edu/site/math108/logs/
         | 
         | Some people have suggested the "triangle of power".
        
           | awesome_dude wrote:
           | The Triangle of power explanation of logarithms is what
           | really got me across logs.
           | 
           | It wasn't until seeing the triangle and having the
           | relationships explained that I had any clue about logarithms,
           | up until then logs had been some archaic number that meant
           | nothing to me.
           | 
           | Because of the triangle of power, I now rock up to B and B+
           | Trees and calculate the number of disc accesses each will
           | require in the worst case, depending on the number of values
           | in each block (eg, log2(n), log50(n) and log100(n))
        
             | cafeinux wrote:
             | Ironically, that notation, which I just discovered,
             | confuses me more than anything else. Logs clicked for me
             | when someone online said "amongst all the definitions we
             | have for logs, the most useful and less taught is that
             | log() is just a power". At that exact instant, it's like if
             | years of arcane and foreign language just disappeared in
             | front of my eyes to leave only obviousness and poetry.
        
               | awesome_dude wrote:
               | That is not without humour :)
               | 
               | I don't understand the comment about it just being a
               | power, but, for me, knowing that it's filling in the
               | third vertice on the triangle with exponents at the top,
               | and n on the other is what makes it work for me - I now
               | know in my head when I am looking for the log of n, I am
               | looking for the exponent that would turn the log into n.
               | 
               | I don't go looking for the exact log, I only look for
               | whole numbers when I am calculating the value in my mind.
               | 
               | But it makes sense when I am looking for the log2 of 8 to
               | know that the answer is "what exponent will make 2 into
               | 8"? and that's "3"
        
               | cafeinux wrote:
               | I said "power" as in "exponent", so we basically have the
               | same understanding, I just do without the triangle.
        
           | the__alchemist wrote:
           | Yea; this owns. I used it for my own stuff.
        
           | nh23423fefe wrote:
           | I never understand why anyone thinks its good notation. The
           | layout means nothing and lets you infer nothing because
           | exponentiation isn't a 2d planar geometric operation. All the
           | information and rules are contained in the idea "exponentials
           | map the additive reals to the multiplicative reals".
           | 
           | The notation conveys no information at all, and provides no
           | means of proving anything, and even the notation for function
           | composition is worse.
           | 
           | Given the operator pow : R^2->R there are 2 possible
           | inverses. root and log
           | 
           | root isn't even interesting. its just pow with the 2nd
           | argument precomposed with reciprocal. root x b = pow x 1/b
        
           | majkinetor wrote:
           | https://www.youtube.com/watch?v=sULa9Lc4pck
        
           | empath75 wrote:
           | I think it's good for explanation purposes, but not actually
           | great as notation, especially for operations that are so
           | common, too much room for ambiguity, especially when writing
           | quickly.
        
           | kenjackson wrote:
           | I've never seen this before, and I LOVE it! I'm a new
           | advocate!
        
         | thaumasiotes wrote:
         | Well, currently exponentiation has a superscript exponent to
         | the right of the base, and logs have a subscript base to the
         | left of the exponent. They're already very similar to your
         | example, but they also include the word "log".
        
       | Animats wrote:
       | Is this the same author who wrote Win32 API books?
        
         | Jtsummers wrote:
         | Yes. https://www.lostartoflogarithms.com/author/
        
           | fph wrote:
           | https://www.charlespetzold.com/PetzoldTattoo.jpg
        
         | ohgr wrote:
         | Yes the office door stop as it was known as at our place. Top
         | book though just faded in utility and no one had the heart to
         | dispose of it because of the good memories.
        
           | Dwedit wrote:
           | Good book indeed, just that I wouldn't use a book to look up
           | Win32 API functions.
        
             | ohgr wrote:
             | It used to be the only way!
        
             | werdnapk wrote:
             | Oh, the hours I'd spend browsing through tech books back in
             | the day... good times.
        
               | hughw wrote:
               | Yeah, a good tech bookstore was a golden way to spend an
               | hour.
        
       | hyperopt wrote:
       | Charles Petzold wrote one of my favorite books - "Code: The
       | Hidden Language of Computer Hardware and Software". Very excited
       | to see how this turns out and thanks for giving some of this
       | knowledge away for free!
        
         | tocs3 wrote:
         | I would also recommend the "NAND to Tetris" book. Covers much
         | the same ground (as I remember things anyway) but is a hands on
         | approach. I enjoyed Code also though and is worth a look for
         | those interested.
        
       | tmoertel wrote:
       | Here's an logarithmic fact that I've made use of frequently:
       | 
       | If _X_ is a random variable having a uniform distribution between
       | zero and one, then -ln( _X_ )/ _l_ has an exponential
       | distribution with rate _l_.
       | 
       | This relationship comes in handy when, for example, you want to
       | draw weighted random samples. Or generating event times for
       | simulations.
        
         | zwnow wrote:
         | How long do I have to study math to understand this?
        
           | whereismyacc wrote:
           | to understand what they said, or to understand a proof of why
           | it would be true?
           | 
           | any stats class would be enough to understand what they said
        
             | pc86 wrote:
             | I know what all these words mean, it "makes sense" to me in
             | the sense that I read it and I think "ok.." but I wouldn't
             | have the slightest idea how to use this to get weighted
             | random samples or "generate event times."
             | 
             | So I guess I "understand it" in the sense that it doesn't
             | sound like a foreign language, but I can't apply it in any
             | meaningful way.
        
           | pvg wrote:
           | Depends where you're starting from but from highschoolish
           | maths you can probably sort this out in a few hours or days.
        
           | jrussino wrote:
           | I love that you asked this, but I think it's not _quite_ the
           | right question.
           | 
           | I've been wishing for years that someone would maintain a
           | "dependency graph" for mathematical concepts. I think Khan
           | Academy tried to do something like this at one point but took
           | it down a long time ago. As long as we're far enough from the
           | bleeding-edge of research topics, I feel like maths is the
           | one field where this might be possible to do really well. You
           | should be able to point at something you don't understand and
           | trace backwards in a very granular fashion until you hit a
           | concept you already know/understand, and then learn what you
           | need to fill in the gap!
        
             | pvg wrote:
             | That's more-or-less the purpose of
             | https://mathworld.wolfram.com/ or at least, it's
             | significantly better at it than, say, wikipedia.
        
             | elevation wrote:
             | I had wanted to build a website like this as a hobby,
             | except not limited strictly to mathematical concepts. I
             | wanted to build a graph of the skills/concepts you'd need
             | to understand electrical impedance, fix an air conditioning
             | system, bake bread reliably.
             | 
             | One source of information could be course syllabi, which
             | describe a progression of topics and their prerequisites.
             | 
             | Rather than be the authority on what concepts must precede
             | others, I envisioned making a system that could represent
             | different educational approaches: not every educator agrees
             | that Calculus I ought to be a prerequisite for studying
             | Physics I. Not all bread recipes use yeast.
             | 
             | I had a hard time finding a good domain for this effort.
             | "Tree of knowledge" dot TLD was taken.
        
           | bgnn wrote:
           | Depends on how much you practiced high school math. It's not
           | hard but we forget it without practice.
        
           | carabiner wrote:
           | Ask chatgpt to explain it to you like you're 18. It made it
           | really easy to understand.
        
           | bobbylarrybobby wrote:
           | Unless I'm missing something, this can just be directly
           | verified, no "understanding" necessary. All you need to know
           | is that probability distributions can be characterized by
           | their probability density function (PDF).
           | 
           | If Y=-ln(X)/lambda, then P(Y<a) = P(-ln(X)/lambda<a) =
           | P(X>exp(-lambda a)) = 1-exp(-lambda a).
           | 
           | And if Z is exponential with rate parameter lambda, then
           | P(Z<a) = P(lambda exp(-lambda t)<a) = integral from 0 to a of
           | lambda exp(-lambda t)dt, which can be directly computed to be
           | 1-exp(-lambda a).
           | 
           | They have the same PDF, so they're the same distribution.
        
             | timeinput wrote:
             | I mean if starting from scratch that seems like many years
             | in most western education systems to get to probability,
             | logarithms, exponentiation.
             | 
             | I would say If you knew 2+2=4, and not much else you're
             | years away from 'understanding', if you know ln(exp(y)) =
             | y, and P(x>0.5) = 0.5 for a uniform distribution on [0, 1)
             | then you don't need any additional understanding.
             | 
             | I would bet the GP comment is somewhere inbetween the two
             | extremes, but I think a random sampling of the population
             | would likely result in people generally not knowing the log
             | / exponentiation relation, or anything about the uniform
             | distribution.
        
               | zwnow wrote:
               | Yea got many answers and I dont understand a single one.
               | Good thing you barely need math in programming.
        
           | tmoertel wrote:
           | Most textbooks on probability have some discussion of the
           | relationships between the various distributions commonly in
           | use. If you just want a quick overview, I found John D.
           | Cook's diagram to be handy:
           | 
           | https://www.johndcook.com/blog/distribution_chart/
        
           | dynm wrote:
           | Possibly unhelpful answer: Arguably none! This is presented
           | as a surprising fact, but you could easily argue that this is
           | the proper _definition_ of an exponential distribution. If
           | you do
           | 
           | x = -log(rand())/lambda
           | 
           | a bunch a times, that comes from _something_ , right? Well,
           | let's call that something an exponential distribution.
           | 
           | From this perspective, the thing that actually needs math is
           | finding the density function of the exponential distribution.
           | (For that, in theory you just need calc 101 and probability
           | 101.)
        
           | coliveira wrote:
           | If you study calculus and introduction to probability theory,
           | then you're ready to learn this. So the answer is about 2
           | years after high school.
        
           | dfawcus wrote:
           | Not long. We were taught logs, and use of log tables, at
           | Middle School. So probably around about age 11.
           | 
           | I also vaguely recall a couple of lessons where we went over
           | Napier's Bones, and they had us produce equivalents on pieces
           | of paper to cut out and move around.
           | 
           | I believe I still have my school day log tables around
           | somewhere. I'd just have to practice for 1/2 hr to remind
           | myself how to use them. That said, they did have usage
           | instructions in the last few pages.
        
             | zwnow wrote:
             | Look im 30, most people I know have forgotten all of school
             | math long ago, me included. Entry barrier too big now.
        
               | dfawcus wrote:
               | Having scanned through his book, it makes it seem overly
               | complex.
               | 
               | At middle school, this was taught after having only done
               | simply arithmetic and learning about fractions (rational
               | numbers) in primary school, then decimal fractions in
               | middle school.
               | 
               | The use of logs from the tables was simply a set of basic
               | rules for how to apply them to a few scenarios. I can't
               | recall if it covered trig with those tables, but I doubt
               | it.
               | 
               | I learnt as a child between 10 (when I started middle
               | school), and say around 12 at most. I've forgotten the
               | use, but vaguely recall some way of representing negative
               | numbers in the table (n-bar, with a bar above the digit).
               | 
               | I'm way over 30. I never used log tables after high
               | school, and have forgotten the rules for usage, but
               | recall it didn't take long to learn the first time. *
               | 
               | However for simple uses (multiplication and division) I'd
               | expect I'd be able to pick it up again in at most a weeks
               | worth of practice. It would be made a lot easier now by
               | being able to compare and check calculations with a
               | computer or pocket calculator.
               | 
               | I'd expect any adult able to program a computer to also
               | be able to pick it up in a similar period, or at most a
               | month.
               | 
               | Remember we used to teach this to kids, and expect them
               | to be able to pick it up (if not be accurate in
               | application) in under a weeks worth of lessons.
               | 
               | * Note I didn't even know how to do long multiplication
               | when I learnt, as due to political interference with
               | teaching curriculum, I'd not been taught at primary
               | school.
        
               | mixmastamyk wrote:
               | Khan academy could get you through it, in I'd guess a
               | month or three, depending on your time available.
        
           | wanderingmind wrote:
           | All you need is plot -log(x) for x between 0 and 1 and you
           | will see that log(x) transforms a uniform line into an
           | exponential decay (towards 1). Its being said in a fancy way.
           | This is also the origin of the log likelihood loss function
           | in ML
        
           | analog31 wrote:
           | It seems like there's always more than one way to skin a cat,
           | but I'd have turned to calculus, had I needed to derive
           | something like this and didn't think to look it up (e.g.,
           | before the Internet).
        
         | pash wrote:
         | The general version of this is called _inverse transform
         | sampling_ [0], which uses the fact that for the cdf _F_ of any
         | random variable _X_ the random variable _Y = F(X)_ has a
         | standard uniform distribution [1]. Since every cdf increases
         | monotonically on the unit interval, every cdf is invertible
         | [2]. So apply the inverse cdf to both sides of the previous
         | equation and you get _F^-1(Y) = X_ is distributed like _X_.
         | 
         | Sampling from a standard uniform distribution and then using
         | the inverse transform is the commonest way of generating random
         | numbers from an arbitrary distribution.
         | 
         | 0. https://en.m.wikipedia.org/wiki/Inverse_transform_sampling
         | 
         | 1.
         | https://en.m.wikipedia.org/wiki/Probability_integral_transfo...
         | 
         | 2. Not every cdf is one-to-one, however, so you may need a
         | generalized inverse.
        
           | tmoertel wrote:
           | For the particular case of the exponential distribution we
           | can go further. By taking advantage of the theory of Poisson
           | processes, we can take samples using a parallel algorithm. It
           | even has a surprisingly succinct SQL translation:
           | SELECT *         FROM Population         WHERE weight > 0
           | ORDER BY -LN(1.0 - RANDOM()) / weight         LIMIT 100  --
           | Sample size.
           | 
           | Notice our exponentially distributed random variable on
           | prominent display in the ORDER BY clause.
           | 
           | If you're curious, I explore this algorithm and the theory
           | behind it in
           | https://blog.moertel.com/posts/2024-08-23-sampling-with-
           | sql....
        
             | lkuty wrote:
             | Quite off-topic, but do you know when you'll write the
             | article about CPS, if ever?
        
               | tmoertel wrote:
               | Oops. I had quite forgotten that I need to write about
               | that. I said I would over a decade ago, so that's a long
               | time for you to wait. Sorry about that.
               | 
               | I mainly write for myself, so I need the time and the
               | motivation. Until recently, my job at G took up my time
               | and also provided an internal community where I could
               | scratch the writing itch, which reduced the motivation
               | for public writing on my blog. But now that I'm semi-
               | retired, I'll try to write more frequently.
               | 
               | Thanks for the accountability!
        
           | evanb wrote:
           | Inverse transform sampling is a special case of normalizing
           | flow where we don't need to learn anythin.g
           | 
           | https://en.wikipedia.org/wiki/Flow-based_generative_model
        
         | cgadski wrote:
         | One way to understand why without writing down the CDF/PDF:
         | 
         | When X is an exponential variable and c is a constant, X + c
         | has the same distribution as X after conditioning on large
         | outcomes. In other words, these two variables have same "tail."
         | This is true exactly for exponential distributions. (Sometimes
         | this is called "memorylessness.")
         | 
         | Similarly, when U has a uniform distribution on [0, 1] and c is
         | a constant, cU has the same distribution as U after
         | conditioning on small outcomes.
         | 
         | But if cU is distributed like U near 0, then -ln(c U) is
         | distributed like -ln(U) near infinity. But -ln(c U) = -ln(c) -
         | ln(U), so the tail of -ln(U) doesn't change when we add a
         | constant, meaning it must have an exponential distribution.
        
       | inasio wrote:
       | There used to be practical value to be able to do some basic back
       | of the envelope log calculations in your head (no calculators,
       | this was how you did fast multiplications/divisions or
       | exponents). There's a story in Feyman's Surely you're joking book
       | about Los Alamos scientists doing speed competitions for mental
       | log calculations
        
       | NoMoreNicksLeft wrote:
       | If the author is in here, thank you. Been looking for a text for
       | my daughter on the subject. This might just fit the bill. If
       | you're just the linker, then thank you Ozanonay.
        
       | inasio wrote:
       | (I'm sure this is in the book) John Napier, the father of
       | logarithms (the N in ln), basically had a sweatshop of human
       | calculators making log tables over something like 20 years -
       | critical for celestial navigation. There was a huge price
       | attached to the person that developed a method to safely navigate
       | across the oceans, also lead to the invention of the pocket watch
        
         | dekhn wrote:
         | isn't the n in ln "natural" ("logarithm natural")?
        
           | floydnoel wrote:
           | yes i was taught that "ln" stood for "natural log"
           | 
           | would be interested to hear other definitions!
        
       | dekhn wrote:
       | I learned the multiplication using addition and a lookup table in
       | a class taught by Huffman (of Huffman compression fame). You
       | weren't allowed to use a calculator on the test.
       | 
       | But my absolute favorite trick is base conversions,
       | https://www.khanacademy.org/math/algebra2/x2ec2f6f830c9fb89:...
       | with some practice you can do approximate base conversions (power
       | to 2 to power of 10 or e) in your head
        
       | dkislyuk wrote:
       | I found that looking at the original motivation of logarithms has
       | been more elucidating than the way the topic is presented in
       | grade-school. Thinking through the functional form that can solve
       | the multiplication problem that Napier was facing (how to
       | simplify multiplying large astronomical observations), f(ab) =
       | f(a) + f(b), and why that leads to a unique family of functions,
       | resonates a lot better with me for why logarithms show up
       | everywhere. This is in contrast to teaching them as the inverse
       | of the exponential function, which was not how the concept was
       | discussed until Euler. In fact, I think learning about
       | mathematics in this way is more fun -- what original problem was
       | the author trying to solve, and what tools were available to them
       | at the time?
        
         | cauliflower2718 wrote:
         | This follows directly from the fact that exp(x+y)=exp(x)exp(y).
        
           | dkislyuk wrote:
           | Yes, but such a property was not available to Napier, and
           | from a teaching perspective, it requires understanding
           | exponentials and their characterizations first. Starting from
           | the original problem of how to simplify large multiplications
           | seems like a more grounded way to introduce the concept.
        
             | kccqzy wrote:
             | From a teaching perspective it goes like this: first we
             | learn additions, and to undo additions we have
             | subtractions; then we learn repeated additions i.e.
             | multiplications, and to undo multiplications we have
             | divisions; finally we learn repeated multiplications, i.e.
             | exponentiation, and to undo exponentiation we have
             | logarithms and roots.
        
               | BobaFloutist wrote:
               | You see how one of those isn't like the others?
        
               | kccqzy wrote:
               | You mean we have both logarithms and roots to undo
               | exponentiation? That's because exponentiation is non-
               | commutative.
        
         | saulpw wrote:
         | I think this should be front and center. To that end I propose
         | "magnitude notation"[0] (and I don't think we should use the
         | word logarithm, which sounds like advanced math and turns
         | people away from the basic concept, which does make math easier
         | and more fun).
         | 
         | https://saul.pw/mag
        
           | JadeNB wrote:
           | > I think this should be front and center. To that end I
           | propose "magnitude notation"[0] (and I don't think we should
           | use the word logarithm, which sounds like advanced math and
           | turns people away from the basic concept, which does make
           | math easier and more fun).
           | 
           | The only reason that "logarithm" sounds like advanced math is
           | because it was so useful that mathematicians, well, used it.
           | Since this terminology is just logarithms without saying the
           | word, if it is more useful it, too, will probably be used by
           | mathematicians, and then it will similarly come to sound like
           | advanced math. So what's the point of running away from a
           | name for what we're doing that fits with what it's actually
           | called, if eventually we'll just have to make up a new, even
           | less threatening name for it?
           | 
           | (I'd argue that "logarithm" is frightening less because it
           | sounds like advanced math than because it's an unfamiliar and
           | old-fashioned-sounding word. I'm not completely sure that
           | "magnitude" avoids both these issues, but it's at least
           | arguable that it suffers less from them.)
        
             | saulpw wrote:
             | It's written like ^6 and said like "mag 6", which sounds
             | like an earthquake (and this is basically the Richter scale
             | writ large). One syllable, sounds cool, easy to type/spell,
             | evokes largeness. "Logarithm" is 3-4 syllables, hard to
             | pronounce, hard to spell, sounds jargon-y.
        
           | bumbledraven wrote:
           | I have been writing the same thing by (ab)using the existing
           | unit of measurement known as a bel (B), which is most
           | commonly seen with the SI prefix "deci" (d) as dB or decibel.
           | I write the speed of light as 8.5 Bm/s ("8.5 bel meters per
           | second"), which resembles the expression 20 dBV ("20 decibel
           | volts") shown at https://en.wikipedia.org/wiki/Decibel.
        
           | kzrdude wrote:
           | If logarithm sounds too advanced, just say log and logs. I
           | think it could work!
        
             | saulpw wrote:
             | Mag is the inverse of log10. e.g. log10 ^6 = 6. We have no
             | current shorthand for inverse log10 except "tentothe" which
             | might be serviceable but is not as punchy.
        
         | agumonkey wrote:
         | I often wonder about this. I also believe that mathematical
         | pedagogy strive to attract people that are very smart and think
         | in the abstract like euler, and not operationally, meaning they
         | will get it intuitively.
         | 
         | For other people, you need to swim in the original problem for
         | a while to see the light.
        
           | BobbyTables2 wrote:
           | Math is rarely taught with practical problems in mind --
           | that's engineering !
        
             | smitty1e wrote:
             | Therein lies the rub. Treating abstract and the concrete in
             | isolation was always tough sledding for me.
             | 
             | Bouncing between the two is where the action is.
             | 
             | And units: if I had it all to do over, I would pore over
             | the units sooner rather than later.
        
               | pbronez wrote:
               | Absolutely. Units are such a useful idea.
               | 
               | I was recently struggling to model a financial process
               | and solved it with Units. Once I started talking about
               | colors of money as units, it became much easier to reason
               | about which operations were valid.
        
               | kqr wrote:
               | Strictly speaking this is about dimensional analysis, not
               | units. (When discussing curricula we should be precise!)
        
             | fenomas wrote:
             | Agreed, and it's such a shame! A kid goes to math class and
             | learns, say, derivatives as this weird set of
             | transformations that have to be memorized, and it's only
             | later in in physics class that they start to see why the
             | transformations are useful.
             | 
             | I mean, imagine a programming course where students spend
             | the whole first year studying OpenGL, and then in the
             | second year they learn that those APIs they've been
             | memorizing can be used to draw pictures :D
        
               | DrFalkyn wrote:
               | Rules for derivatives require the least memorization
        
               | meindnoch wrote:
               | I've never seen an introductory math textbook that didn't
               | point out how position, velocity and acceleration are
               | related by the derivative.
        
             | mrcsd wrote:
             | I really disagree with the straightforward reduction of
             | engineering to 'math but practical', but I'm finding it
             | hard to express exactly why I feel this way.
             | 
             | The history of mathmatical advancement is full of very
             | grounded and practical motivations, and I don't believe
             | that math can be separated from these motivations. That is
             | because math itself is "just" a language for precise
             | description, and it is made and used exactly to fit our
             | descriptive needs.
             | 
             | Yes, there is the study of math for its own sake, seemingly
             | detached from some practical concern. But even then, the
             | relationships that comprise this study are still those that
             | came about because we needed to describe something
             | practical.
             | 
             | So I suppose my feeling is that, teaching math without a
             | use case is like teaching english by only teaching sentence
             | construction rules. It's not that there's nothing to glean
             | from that, but it is very divorced from its real use.
        
             | agumonkey wrote:
             | Well, logarithms were made from physical entities
             | (celestial bodies) but not on engineering per se.
             | 
             | I think this is already enough context to root the mental
             | effort deeper.
        
           | II2II wrote:
           | I think it is a combination of factors. Mathematical pedagogy
           | is legitimate if the end goal is to train mathematicians, so
           | yes it is geared towards those who think in the abstract.
           | (I'm going to ignore the comment about very smart, since I
           | don't think mathematical ability should be used as a proxy
           | for intelligence.)
           | 
           | On the other side, I don't think those who are involved in
           | curriculum development are very skilled in the applications
           | of mathematics. I am often reminded of an old FoxTrot comic
           | where Jason calculated the area of a farmer's field using
           | calculus.
        
             | melagonster wrote:
             | Mathematicians also hate the current version of math
             | education.
        
             | BobaFloutist wrote:
             | Frankly I wish I had known integral calculus going into
             | geometry, I could tell there was a pattern behind formulas
             | for areas and volumes but I couldn't for the life of me
             | figure it out. There are worse ways to remember the formula
             | for the volume of a sphere than banging out a quick
             | integral!
        
               | ForOldHack wrote:
               | I had known it. Thanks Dr Steven Giavat. The geometric
               | shapes gave the patterns meaning. I read 'mathematics and
               | the imagination' and mathematics a human endever' while I
               | was starting algebra. Also the time-life book on math.
               | All very brilliant because they used the methods that
               | were used to investigate it, to show how it was
               | discovered. These allowed me to fly ahead in math until I
               | got to trig. Which took a long year to get facile, until
               | I was able to finish my degree.
               | 
               | I had brilliant teachers.
               | 
               | Napier's bones, were for adding exponents, hense
               | multiplication. Brilliant and nessary for the development
               | of the slide rule, and the foundation of modern
               | engineering, until the pocket calculator.
        
         | malshe wrote:
         | We used logarithms routinely for large multiplications,
         | divisions, etc. in 11th and 12th grade. No calculators were
         | allowed. This was in India.
        
           | ninalanyon wrote:
           | Same here when I was at school in the late 1960s and early
           | 1970s. No one had a calculator.
           | 
           | So we were taught logarithms as a tool first.
        
         | meta_ai_x wrote:
         | I actually prefer the straightforward log is an inverse of
         | exponents. It's more intuitive that way because I automatically
         | can understand 10^2 * 10^3 = 10^5. Hence if you are using log
         | tables, addition makes sense. I didn't need an essay to explain
         | that.
         | 
         | Take logs, add 2 + 3 = 5 and then raise it back to get 10^5.
        
           | kqr wrote:
           | This is how I've always taught logarithms to students I've
           | tutored. I photocopy a table of various powers of ten, we use
           | it in all sorts of ways to solve problems, and then I
           | sneakily present an "inverse power" problem where they need
           | to make the lookup backwards.
           | 
           | Almost every student gets it right away, and then I tell them
           | looking up things backwards in the power table is called
           | taking a logarithm.
        
           | Dunan wrote:
           | That's how I mentally processed them when first learning them
           | years ago. Doing operations on x and y with log(x) = y in the
           | background somehow felt far less intuitive than thinking
           | about 10^y = x.
           | 
           | I really enjoyed this author's work, BTW. Just spent several
           | hours reading the entire first five chapters or so. What an
           | excellent refresher for high school math in general.
        
         | analog31 wrote:
         | This would be an interesting thing to study: How many different
         | ways people learned about logarithms, and how they generally
         | fared in math. I learned about logarithms by seeing my dad use
         | his slide rule, and studying stock charts, which tended to be
         | semi-logarithmic.
        
         | madars wrote:
         | Toeplitz wrote "Calculus: The Genetic Approach" and his
         | approach of explaining math via its historical development is
         | apparently more widely used:
         | https://en.wikipedia.org/wiki/Genetic_method . Felix Klein
         | remarked: "on a small scale, a learner naturally and always has
         | to repeat the same developments that the sciences went through
         | on a large scale"
        
           | b0afc375b5 wrote:
           | I always longed for a book/course on mathematics where topics
           | are in chronological order:
           | 
           | 1. ... (mathematical topics at the beginning of history of
           | which I am ignorant of)
           | 
           | 2. pythagoras theorem
           | 
           | 3. ...
           | 
           | 4. euclid geometry
           | 
           | 5. ...
           | 
           | 6. algebra
           | 
           | 7. ...
           | 
           | 8. calculus
           | 
           | 9. ...
           | 
           | 10. set theory
           | 
           | 11. ...
           | 
           | 12. number theory
           | 
           | 13. etc. etc. (you get the point)
           | 
           | Maybe there's already something that lays out topics like
           | this. I haven't searched too hard.
        
             | twelvechairs wrote:
             | I'm sympathetic but there's no clear historic chronology.
             | For instance the ancient egyptians dealt with both algebra
             | and calculus (at least in part) long before Pythagoras. And
             | thats not starting on China and India which had very
             | different chronologies.
        
               | PaulRobinson wrote:
               | Choose a chronology that makes sense. We can see how
               | Western ideas build, we have less clarity on how the
               | ancient Egyptians or Chinese ideas developed, and
               | therefore it's harder to explain to a learner.
               | 
               | If you're sensitive to that singular world view warping
               | the learner's prospect, you could at each point explain
               | similar ideas from other cultures that pre-date that
               | chronology.
               | 
               | For example, once you've introduced calculus and helped a
               | student understand it, you can then jump back and point
               | out that ancient Egyptians seemed to have a take on it,
               | explain it, ask the student to reason did they get there
               | in the same way as the Western school of ideas did, is
               | there an interesting insight to that way of thinking
               | about the World?
               | 
               | Another ideas is how ideas evolved. We know Newton and
               | Leibniz couldn't have had access to direct Egyptian
               | sources (hieroglyphs were a lost language in their life
               | times), but Greek ideas would have been rolling around in
               | their heads.
        
             | spc476 wrote:
             | There is _Mathematics for the Million_ by Lancelot Hogben,
             | which not only covers math, but the history of math and why
             | it was developed over the centuries. It starts with
             | numbers, then geometry, arithmetic, trig, algebra,
             | logarithms and calculus, in that order. It 's a very cool
             | book.
        
               | SoleilAbsolu wrote:
               | I was going to say the same! I got it years ago, it's
               | hard to top a math book with a quote from a certain Al
               | Einstein on the back cover singing its praises! Morris
               | Kline's "Mathematics for the Nonmathematician" takes a
               | similar approach, as I believe other books by the author
               | do. Can also recommend "Code" by Charles Petzold and "The
               | Information" by James Gleick, while not comprehensive
               | they do cover the development of key mathematical
               | insights over time.
        
             | zwnow wrote:
             | A book without expecting any knowledge of mathematical
             | notation would be a good start. I've bought 3 math books to
             | get into it and quit all of them within the first chapter.
        
               | -__---____-ZXyw wrote:
               | In a roundabout way, I wonder does this one fit what
               | you're after:
               | 
               | https://bogart.openmathbooks.org/ctgd/ctgd.html
               | 
               | And more directly, a quick browse showed up a book
               | called:
               | 
               | "Mathematical Notation: A Guide for Engineers and
               | Scientists" which looks like it addresses your issue
               | directly.
        
               | zwnow wrote:
               | The issue is that I dont want to explicily learn all of
               | the notation but step by step, topic related with
               | usecases in the real world...
        
             | biofox wrote:
             | There are two books which do a fantastic job of this:
             | 
             | Mathematics: From the Birth of Numbers, by Jan Gullberg
             | 
             | and
             | 
             | Mathematics: A Cultural Approach, by Morris Klein
        
             | markstock wrote:
             | Here's one that starts with the concept of a straight line
             | and builds all the way to string theory. It's a monumental
             | book, and it still challenges me. Roger Penrose's The Road
             | To Reality.
        
             | vonneumannstan wrote:
             | This one was just discussed on HN yesterday with pretty
             | good reviews: https://www.amazon.com/Math-Through-Ages-
             | Teachers-Mathematic...
        
           | twbarr wrote:
           | We could really take a page from this style for teaching
           | advanced computing. We try to imagine that architectures just
           | kind of come out of nowhere. Starting with mechanical
           | computing and unit record equipment makes so much make more
           | sense.
           | 
           | Plus, unit record equipment was cool.
        
             | blame-troi wrote:
             | Very cool. But so many of us paid not enough attention to
             | the details. Only two of the people in my first shop
             | attempted channel programming.
        
           | codesuki wrote:
           | I recently read mathematics for the nonmathematician. https:/
           | /www.goodreads.com/book/show/281821.Mathematics_for_t...
           | 
           | Although the math in the book is relatively basic I enjoyed
           | it tremendously because it gives the historical development
           | for everything and even describes the characters of different
           | mathematicians, etc. The historical context helps so much
           | with understanding.
        
           | nkoren wrote:
           | It's ontogeny recapitulating phylogeny, all the way down.
        
         | coffeemug wrote:
         | Where did you pick this up? Is there a book that covers it that
         | way?
        
           | II2II wrote:
           | In my case, it was by chance.
           | 
           | I had a slide rule in high school. It was more of a novelty
           | item by that point in time, only one of my math teachers even
           | knew what a slide rule was, but that didn't stop me from
           | figuring out how it was used and how it works. It didn't take
           | much to figure out that the sliding action was solving
           | problems by addition, and the funky scales were logarithmic.
           | In other words: it performed multiplication by adding logs.
           | 
           | That said, I did encounter references to its original
           | applications in other places. I studied astronomy and had an
           | interest in the history of computation.
        
           | dkislyuk wrote:
           | Presumably the book from this thread by Charles Petzold will
           | be a great canonical resource, but originally there was a
           | quote by Howard Eves that I came across that got me curious:
           | 
           | > One of the anomalies in the history of mathematics is the
           | fact that logarithms were discovered before exponents were in
           | use.
           | 
           | One can treat the discovery of logarithms as the search for a
           | computation tool to turn multiplication (which was difficult
           | in the 17th century) into addition. There were previous
           | approaches for simplifying multiplication dating back to
           | antiquity (quarter square multiplication, prosthaphaeresis),
           | and A Brief History of Logarithms by R. C. Pierce covers
           | this, where it's framed as establishing correspondences
           | between geometric and and arithmetic sequences. Playing
           | around with functions that could possibly fit the functional
           | equation f(ab) = f(a) + f(b) is a good, if manual, way to
           | convince oneself that such functions do exist and that this
           | is the defining characteristic of the logarithm (and not just
           | a convenient property). For example, log probability is
           | central to information theory and thus many ML topics, and
           | the fundamental reason is because Claude Shannon wanted a
           | transformation on top of probability (self-information) that
           | would turn the probability of multiple events into an
           | addition -- the aforementioned "f" is the transformation that
           | fits this additive property (and a few others), hence log()
           | everywhere.
           | 
           | Interestingly, the logarithm "algorithm" was considered quite
           | groundbreaking at the time; Johannes Kepler, a primary
           | beneficiary of the breakthrough, dedicated one of his books
           | to Napier. R. C. Pierce wrote:
           | 
           | > Indeed, it has been postulated that logarithms literally
           | lengthened the life spans of astronomers, who had formerly
           | been sorely bent and often broken early by the masses of
           | calculations their art required.
        
         | JackFr wrote:
         | This is how I learned them in middle school -- just common
         | logs, as an aid to doing roots, powers and multiplications of
         | big numbers.
         | 
         | We were told in an off-hand way that logs could be to any base,
         | even 'e', but not to worry about that for a few years.
        
         | meindnoch wrote:
         | By the way, there's another function that can be used to turn
         | multiplication into addition: f(x) = x^2 / 2
         | 
         | a * b = f(a + b) - (f(a) + f(b))
        
           | secondcoming wrote:
           | Isn't x^2 a multiplication?
        
             | meindnoch wrote:
             | No, you misunderstood what I meant.
             | 
             | Normally, a sliderule at distance x has the value of log(x)
             | written on it, which allows doing multiplications by moving
             | along the sliderule, since log(ab) = log(a) + log(b).
             | 
             | Now imagine a sliderule onto which values of x^2/2 are
             | written. This _also_ allows you to multiply two numbers,
             | because ab = (a+b)^2 /2 - (a^2/2 + b^2/2).
        
         | pipes wrote:
         | Coincidentally I watched this last night
         | https://m.youtube.com/watch?v=7TWKSMtKCmU
         | 
         | It gives the history / motivation behind logarithms and
         | suddenly it became so much clearer to me. Pretty much
         | multipling huge numbers by adding exponents , well I think I've
         | understood that correctly?
         | 
         | I think why I'm so interested in programming and computing is
         | because I fascinated by the history of it all. It somehow acts
         | as a motivation to understand it.
        
         | tim333 wrote:
         | I rather like Feynman's approach in the lecture Algebra from
         | the Feynman Lectures
         | https://www.feynmanlectures.caltech.edu/I_22.html
         | 
         | He covers the inverse of the exponential, Henry Briggs' log
         | tables and goes on to e^ix = cos x + i sin x
         | 
         | The audio is also available
         | https://www.feynmanlectures.caltech.edu/flptapes.html
        
         | xiande04 wrote:
         | If you like this approach, I highly recommend Mathematics: It's
         | Content, Methods, and Meaning by Kolmogorov. He uses this same
         | approach, but applies it to many more concepts in math (about
         | 1,000 pages!). In fact, I think I actually heard about that
         | book on this site, so I guess I'm paying it forward.
         | 
         | This approach was to align with the Soviet philosophy of
         | dialectical materialism, which claims that all things arise
         | from a material need. Not sure I'm fully onboard with the
         | philosophy as a whole, but Kolmogorov's book was really eye
         | opening.
        
       | adornKey wrote:
       | The Logarithmic derivative is also something that is surprisingly
       | fundamental.
       | 
       | (ln(f))' = f'/f
       | 
       | In function theory you use it all the time. But people rarely
       | notice, that it related to a logarithm.
       | 
       | Also the functions that have nice logarithmic derivative are a
       | lot more interesting than expected. Nature is full of Gompertz
       | functions. Once you're familiar with it, you see it everywhere.
        
       | sva_ wrote:
       | > Charles Petzold
       | 
       | Haven't heard that name in a while. For me he's the WinApi guy -
       | learned a lot from him when I first started programming.
        
         | mixmastamyk wrote:
         | Still can! His classic book Code is fantastic and has a recent
         | second addition.
        
           | jrmg wrote:
           | Code is a masterpiece.
           | 
           | Anyone here who hasn't read it should do so - you might think
           | it's 'below you', but it's so well written it's a joy to
           | read, and I suspect you'll come out thinking of some things
           | differently.
           | 
           | It reminded me why I love computing.
        
           | mixmastamyk wrote:
           | ^edition.
        
         | esafak wrote:
         | PC Magazine contributor, for me.
        
       | hughw wrote:
       | I feel frustrated that we cannot conceive of numbers like 10^80
       | (atoms in the universe) or 10^4000 (number configurations for a
       | system with 4000 variables having 10 states each). Maybe there
       | are superbrains out there in the universe that can do so.
        
         | crazygringo wrote:
         | I guess you have to define what you mean by "conceive".
         | 
         | I'm not sure you can even conceive a number like 1,000, if
         | you're talking about holding an intuitive visual understanding
         | in your mind at once.
         | 
         | Like, I can easily see 100 in my mind's eye as a 10x10 grid of
         | circles. Even if I don't see each one clearly, I have a good
         | sense of the 10 on each edge and the way it fills in. But ask
         | me to imagine 10 of those side-by-side to make 1,000, and I
         | don't think I can. Once I imagine the 10 groups, each one is
         | just a square simplification, rather than any individual pieces
         | within.
         | 
         | But I'm totally familiar with 1,000 as a concept I can multiply
         | and divide with, and I can do math with 10^80 as well. And I
         | can do so fairly "intuitively" as well -- it's just all the
         | numbers up to 80 digits long. Even 4,000 digits fits on a
         | single page of a book.
        
           | hughw wrote:
           | My first cut at conceiving is to answer "how long would it
           | take a really fast computer to count to that number". The
           | answer for 10^4000 is still something like 10^3978 years. So,
           | a still inconceivable time.
           | 
           | (100 tera-ops computer) [edited to correct calculation)
        
             | crazygringo wrote:
             | But the length of time it takes a modern computer to count
             | to 10 or 1,000 is perhaps inconceivably _small_ by your
             | metric, no? Your idea arbitrarily selects numbers around 2
             | billion as being conceivable, at least for a single core on
             | my MacBook.
             | 
             | But my question isn't what makes 10^4000 inconceivable --
             | my question is what makes 10^4000 any _less_ conceivable
             | than 1000. To me, they 're both firmly in the realm of
             | abstractions we can reason about using the same types of
             | mathematical methods. They're both qualitatively different
             | from numbers like 5 or 10 which are undoubtedly
             | "conceivable".
        
               | hughw wrote:
               | _the length of time it takes a modern computer to count
               | to 10 or 1,000 is perhaps inconceivably small by your
               | metric_
               | 
               | But I'd just call it "instantaneous" and something I
               | experience frequently. Whereas 10^3978 years is beyond
               | experience and even imagination.
        
               | crazygringo wrote:
               | > _But I 'd just call it "instantaneous" and something I
               | experience frequently._
               | 
               | Then since you're OK with all smaller numbers being
               | equally "instantaneous", then 1/10^4000 seconds is
               | instantaneous too. Add up enough of those to make a
               | second, and you can conceive of your previously
               | inconceivable number! :)
               | 
               | Of course, that will seem silly. I'm just illustrating I
               | don't think there are any grounds for claiming
               | exponentially _large_ numbers are _in_ conceivable, but
               | exponentially _small_ numbers are somehow _conceivable_.
               | They 're just as far from 1, multiplicatively, no matter
               | which direction you go in.
        
               | hughw wrote:
               | All right! I cannot _count_ to _any_ fractional number,
               | even conceivable ones, so using the counting time to
               | assess conceivability fails for all fractions.
               | 
               | For _small_ numbers, groping for any experience in the
               | macro world fails once you get below the Planck scale.
               | 
               | I'm afraid you might have broken the fabric of the
               | universe by even _typing_ such a small number.
        
         | MisterTea wrote:
         | To me it's hard because we don't come across these magnitudes
         | on a daily basis. Grains of sand on a beach is an off the top
         | of my head way to visualize such quantities. But yeah, numbers
         | that big, are so big that we have nothing to compare them with.
        
         | kqr wrote:
         | I feel like I have a much better grasp of those numbers since I
         | started using logarithms for mental maths:
         | https://entropicthoughts.com/learning-some-logarithms
        
         | avmich wrote:
         | Read http://mrob.com/pub/math/largenum.html . After that you'll
         | probably look easier to those numbers.
        
       | kqr wrote:
       | I can strongly recommend memorising some logarithms for use in
       | mental maths. It's given me powers I did not expect to have!
       | Here's what I wrote about it when I started:
       | https://entropicthoughts.com/learning-some-logarithms
        
         | xelxebar wrote:
         | What reflections do you have putting this into action over the
         | year since that post?
         | 
         | BTW, your blog is one of my absolute favorites!
        
           | kqr wrote:
           | It's been about as useful as one would expect. I don't need
           | it daily, but when I need it, I can usually estimate a good
           | enough answer in the time it takes someone else to do it on a
           | calculator.
           | 
           | It has also helped a little with getting a geometric
           | appreciation for numbers, but I suspect that could be
           | improved significantly with more active practice.
        
         | nakedneuron wrote:
         | Great blog!
         | 
         | Interesting fact that memory decay also is inherently
         | logarithmic/exponential.
         | 
         | Learning logs with SRS is so meta.
        
       | aquafox wrote:
       | Interesting insight why applying a log transform often makes data
       | normally distributed: Pretty much all laws of nature are
       | multiplications (F=m _a, P_ V=n _R_ T, etc). If you start with
       | i.i.d random variables and multiply them, you get log-normal data
       | by virtue of the central limit theorem (because multiplications
       | are additions on a log scale; and the CLT is also somewhat robust
       | to non iid-ness). Thinking of data as the result of a lot of
       | multiplications of influential factors, we thus get a log-normal
       | distribution.
        
         | TrainedMonkey wrote:
         | All data is linear when plotted on a loglog scale with a thick
         | marker.
        
           | aquafox wrote:
           | But in my explanation, there is no x axis.
        
             | kqr wrote:
             | No but it holds more generally. Taking the log of data
             | tends to make it look "more correct" even when it's not
             | theoretically justified, and this can lead to very wrong
             | conclusions.
        
               | genewitch wrote:
               | Matt Parker says it's because that's how humans are
               | naturally inclined to think, and used the midway point
               | between 1 and 9 to illustrate. We'd say five but
               | "children and others not exposed to math would say 3" and
               | then gave some explanation with beads or coins. It didn't
               | make sense to me but I do know that if a graph is log
               | scale I need to actually look at it harder to make sure
               | they're not trying to pull a fast one on us here folks.
        
           | wolfi1 wrote:
           | the joy of an engineer is to find a straight line in a double
           | logarithmic diagram
        
         | H8crilA wrote:
         | The CLT does not require iid (independent, identically
         | distributed) variables. Just independent and having a variance,
         | plus some rather weak condition on slightly higher orders.
         | Otherwise the variables can be quite different from each other.
        
       | BinRoo wrote:
       | One of my favorite tricks in elementary school was to convince
       | people I can calculate any logarithm for any number of their
       | choosing.
       | 
       | > Me: Pick any number.
       | 
       | > Friend: Ok, 149,135,151
       | 
       | > Me: The log is 8.2
       | 
       | Of course I'm simply counting the number of digits, using 10 as
       | the base, and guessing the last decimal point, but it certainly
       | impressed everyone.
        
         | ted_dunning wrote:
         | You can do even better if you memorize three numbers: 301, 477,
         | 845. These are the values of 1000 _log10(n) for n = 2, 3, 7.
         | From these you can quickly get the values for 4 (= 2_ 2), 5
         | (=10/2), 6 (=2 _3), 8 (=2_ 2 _2) and 9 (=3_ 3).
         | 
         | For your example 1.49 is close to 3 / 2 so the log will be very
         | close 0.477 - 0.301 = 0.176.
         | 
         | This means that your answer is near 8.176 (actual value is
         | 8.173).
         | 
         | This tiny table of logs can also let you answer parlor trick
         | questions like what is the first digit of 2^1000 (the result is
         | very nearly 10^301 but a bit above, so 1 is the leading digit).
        
         | kqr wrote:
         | > 149,135,151
         | 
         | This is 8-point-something as you say.
         | 
         | 1.49 is in between 1.2 and 1.6 and I have memorised
         | log(1.2)=0.1 and log(1.6)=0.2, so I would think log(1.5) is
         | close to 0.17, using sloppy linear interpolation.
         | 
         | That would make log(149,135,151) approximately 8.17. My
         | calculator also says 8.17. Your guess was good!
         | 
         | I have found linear interpolation such an intuitive
         | approximation method that the tradeoff of having to memorise
         | more logarithms is worth it.
        
       | spapas82 wrote:
       | One of the best uses of logarithms is how they can be used to
       | quickly calculate db (as in decibel) gains and losses mentally.
       | See this older comment for more details
       | 
       | https://news.ycombinator.com/item?id=32550539
        
       | xelxebar wrote:
       | How timely! I just learned how to use a slide rule yesterday.
       | Looking to pick one up, and a bit overwhelmed by the plethora of
       | choices, I went down a small rabbit hole[0]. Some slide rules
       | produced are pure works of art!
       | 
       | Lately, I've been rediscovering the surprising niceties that
       | analog tools can provide over our everything-is-a-panel-of-glass
       | interfaces these days. Recently, I have been enjoying pen and
       | paper as my editor for initial drafts of projects I'm coding.
       | 
       | Does HN have love for any analog tools in particular?
       | 
       | [0]:https://sliderulemuseum.com/
        
         | johnm wrote:
         | Indeed, I use pen/pencil and (dot) paper. Different brain
         | space.
        
         | Rendello wrote:
         | I've been doing a math course and occasionally think of picking
         | up these analogue tools. Someone on Hacker News had me
         | interested in the Soroban, the Japanese abacus [1], which is
         | still used to train insane mental math speeds to this day [2].
         | 
         | 1. https://en.wikipedia.org/wiki/Soroban
         | 
         | 2. https://www.youtube.com/watch?v=s6OmqXCsYt8
        
           | xelxebar wrote:
           | We're definitely on a similar wavelength. I actually own a
           | couple Japanese abaci and know the basics. Top performers
           | feel near magical: double-fisters[0] and blazingly fast
           | mental arithmetic [1].
           | 
           | [0]:https://www.youtube.com/watch?v=EK6uIjjkrGE
           | 
           | [1]:https://youtu.be/-kjUCtqSWlw?feature=shared&t=451
        
         | jbaber wrote:
         | Soroban. Japanese abacus. Every number only has one
         | representation. +-*/ and other calculations.
         | 
         | http://totton.idirect.com/
        
         | divbzero wrote:
         | Where can I get the meter-long slide rule the man is holding in
         | OP?
        
           | 7402 wrote:
           | They show up on eBay. A search this minute revealed two:
           | 
           | https://www.ebay.com/itm/205220626817
           | https://www.ebay.com/itm/156686655356
           | 
           | They go for a bit more than the original price, according to
           | this:
           | 
           | "Pricing varied by retailer, however Pickett did offer
           | demonstration slide rules in 4 foot and 7 foot lengths: a 4
           | foot rule sold for $15 and the 7 foot rule was $25 in 1960.
           | These were available with scales to match models N4, N803,
           | and N1010 with the Ln scale added. These large rules were
           | available free to schools which ordered 24 or more slide
           | rules!"
           | 
           | [0] https://www.sphere.bc.ca/oldsite/test/pickett.html
        
         | kqr wrote:
         | I have several slide rules and use them daily. Especially in
         | the kitchen where we deal a lot with scaling proportions they
         | are _the_ best tool available: you set them for the desired
         | scale, and then you can just read off any proportion you need
         | in the blink of an eye.
         | 
         | I'm honestly surprised they are not standard issue in kitchens.
        
       | kazinator wrote:
       | I recommend the classic _Introduction to Logarithms_ , by Cormen,
       | Rivest, Leiserson et al.
        
       | cuttothechase wrote:
       | Charles Petzold was one of my favorite tech authors from the way
       | begone era. Written in a style very similar in vein to the Lost
       | of Art of Logarithms he made me fall in love with the various
       | mundane tech concepts that would never jump out as a anything of
       | interest, otherwise. What a treat!
        
         | tiahura wrote:
         | Programming Windows 95 was invaluable.
        
       | westurner wrote:
       | Notes from "How should logarithms be taught?" (2021)
       | https://news.ycombinator.com/item?id=28519356 re: logarithms in
       | the Python standard library, NumPy, SymPy, TensorFlow, PyTorch,
       | Wikipedia
        
       | alanh wrote:
       | So interesting! The author doesn't, I believe, yet cover how the
       | first log tables were computed (by hand), so I asked ChatGPT.
       | This may be of interest:
       | https://chatgpt.com/share/67d3a64d-f8a8-8012-bde3-e80813b2b4...
        
       | JackFr wrote:
       | A 300 year old log table! What an opportunity to confirm
       | Benford's Law!
       | 
       | https://en.m.wikipedia.org/wiki/Benford's_law
       | 
       | "The discovery of Benford's law goes back to 1881, when the
       | Canadian-American astronomer Simon Newcomb noticed that in
       | logarithm tables the earlier pages (that started with 1) were
       | much more worn than the other pages."
        
       | mikewarot wrote:
       | The traditional explanations of logarithms I've encountered are
       | far too math and terminology heavy for most people to grasp.
       | 
       | Think of a number line.... show example..... 1..2..3..4..5.. etc
       | 
       | Any given move to the right, makes the value go up by 1.
       | 
       | But... What if we did a _special number line_ where each time it
       | doubled instead of adding one? 1..2..4..8..16, etc...
       | 
       | That line would go up way to fast to see numbers like 10, so we
       | can expand it out a bit...show that... and start to fill in the
       | numbers... 2^10 (1024) is almost 1000... so you can divide that
       | distance by 3 to get 10 on the line, then move one unit left for
       | 5... and build out a slide ruler.
       | 
       | Computing logarithms with a 4 function calculator isn't hard by
       | the way, I used to do it for fun on my lunch breaks.
        
       | max_ wrote:
       | I wish there was a mailing list I could subscribe to so I could
       | know when the book os complete.
       | 
       | Or a pre-order on Amazon?
        
       | yujzgzc wrote:
       | I have a few old math manuals at home, from late 19th / early
       | 20th century. Many of them have a logarithm table as an appendix.
       | It looked like the type of things that if you had a few extra
       | sheets to print to make a booklet, you'd just add because it was
       | bound to be very useful to someone.
        
       | hansmayer wrote:
       | Wow, I thought it was just some random guy, but was then quite
       | surprised to see this was being authored by none other than the
       | legendary Charles Petzold. I'd buy this book - just to put it
       | next to my copy of "Programming Windows 95" (who remembers?) :)
        
       | stpedgwdgfhgdd wrote:
       | Well written and fun to read! (For nerds)
        
       | jamalaramala wrote:
       | There was an interesting text, by Isaac Asimov, where he
       | explained in a very clear way the historical importance of
       | logarithms -- they allowed Kepler to finalize his work by
       | replacing tables of multiplications (which were difficult and
       | error-prone) with sums.
        
         | vismit2000 wrote:
         | Realm of Algebra by Isaac Asimov:
         | https://archive.org/stream/RealmOfAlgebra-English-IsaacAsimo...
        
       | vismit2000 wrote:
       | Logging the World - Oliver Johnson (Oxford Mathematics):
       | https://youtu.be/UsK52iZMsxo
        
       | stephencwelch wrote:
       | Yeah love this angle - I made a video in a similar vein:
       | https://www.youtube.com/watch?v=OjIwCOevUew
        
         | sali0 wrote:
         | Huge fan of your channel! Great content.
        
       | ilija139 wrote:
       | Off-topic, but anyone knows where to buy such [1] old but not
       | rare (so they are cheap enough) math books? In UK and globally?
       | Is e-bay and perhaps amazon the best place? How to avoid fakes?
       | 
       | [1] https://www.lostartoflogarithms.com/chapter01/
        
       | vanderZwan wrote:
       | Related: in a reaction to a comment I wrote about logarithms
       | about a month ago[0], saulpw recently linked his own idea of
       | making logarithms more "accessible" to the masses by introducing
       | magnitude-based notation:
       | 
       | https://saul.pw/mag/
       | 
       | I think it is a really nice idea that should be spread more
       | widely. It might be Pi day, and while I traditionally complain
       | that Tau is better for contrarian reasons (hey at least I'm
       | honest), we might as well co-opt the extra attention maths gets
       | for other mathematical causes.
       | 
       | [0] https://news.ycombinator.com/item?id=43036094
        
         | Enginerrrd wrote:
         | For what it's worth, I'm really not a fan.
         | 
         | There's a reason we use scientific notation, and it's actually
         | partly because in the era of slide-rules, it was INCREDIBLY
         | helpful notation that makes it trivial to estimate things like
         | order of magnitude. People performed all manner of operations
         | and kept the magnitude part in their head. It MADE people more
         | magnitude aware.
         | 
         | This magnitude-only based notation is the one that's actually
         | more needlessly complex and error prone. There's no sensible
         | way to manage significant figures or rounding error in simple
         | operations like addition and subtraction. And simple
         | operations, like adding/subtracting two numbers are really non-
         | trivial. If you have to start each operation by converting to a
         | useful format and then converting back, what have you gained
         | exactly by using the notation?
        
           | anjakefala wrote:
           | I think the argument is that for non-scientific usecases,
           | folks don't really need to think about error or significant
           | digits. By focusing on the significand too much laypeople
           | aren't grasping how large and small these numbers are
           | relative to each other.
           | 
           | It's not being put forward as a recommended tool for
           | scientists when reasoning about precise values. It's put
           | forward for laypeople when trying to understand the vastness
           | of the universe.
        
             | vanderZwan wrote:
             | Yes, that was my take-away too. I suspect it's a wonderful
             | way of teaching _intuition_ for differences in scale, which
             | is something that 's a lot more important to us today than
             | it was a few centuries ago. Easy mental guesstimates should
             | not be underestimated as a valuable tool
        
       | sourtrident wrote:
       | Funny how logarithms shaped navigation, astronomy, and music--yet
       | now they're mostly a forgotten button gathering dust on our
       | calculators. Hidden tech history right there.
        
       ___________________________________________________________________
       (page generated 2025-03-14 23:02 UTC)