Plus, unit record equipment was cool.
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.
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.
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.
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.)
For other people, you need to swim in the original problem for a while to see the light.
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.
Take logs, add 2 + 3 = 5 and then raise it back to get 10^5.
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.
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.
So we were taught logarithms as a tool first.
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.
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
a * b = f(a + b) - (f(a) + f(b))
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.
> 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.
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.
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?
I'm honestly surprised they are not standard issue in kitchens.
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!"
If X is a random variable having a uniform distribution between zero and one, then –ln(X)/λ has an exponential distribution with rate λ.
This relationship comes in handy when, for example, you want to draw weighted random samples. Or generating event times for simulations.
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.
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....
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.)
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!
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.
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.
any stats class would be enough to understand what they said
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.
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. 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.)
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);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.
var actualSize = 1 << Integer.highestOneBit(approxSize - 1);
?
Interesting fact that memory decay also is inherently logarithmic/exponential.
Learning logs with SRS is so meta.
BTW, your blog is one of my absolute favorites!
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.
(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.
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
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.”
> 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.
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).
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.
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.
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?
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.
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.
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.
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.
Some people have suggested the "triangle of power".
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
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))
Or a pre-order on Amazon?
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.
(100 tera-ops computer) [edited to correct calculation)