3 ms·
How to do this without relying on the fact that the number is a perfect cube: Learn a handful of logs base 10 (not much more work than the cube digit laws). Ma
by dmurray 4y ago
How to do this without relying on the fact that the number is a perfect cube:
Learn a handful of logs base 10 (not much more work than the cube digit laws). Maybe you know 2,3,5 and e.
19,683 is equal to 20,000
log 20,000 is log 2 + log 10 + log 10 + log 10 + log 10
That's 0.30 + 1 + 1 + 1 + 1 which is 4.30
Divide by 3 (equivalent to taking cube root). That's 1.43
Recall that log e is 0.43. So 1.43 is log (e * 10). Hopefully you remember e = 2.71, so the number you're looking for is 27.1. If you remember that you rounded up to start, you can round back down and guess that it's more like 27.0.
You can simplify this a little further by dividing out thousands and multiplying by 10s at the end, so you only need to find the cube root of 20 using the same process.
- colinbeveridge 4y agoI did it similarly: log(19,683) is about 4.3, so ln(19,683) is about 4.3 * 2.3, which is about 9.9. That jumps out as close to 9ln(3). So the natural log of the cube root is (presumably) 3 ln(3), making the cube root itself 27. Alternatively, the digit sum of 19,683 is 27, so the cube is a multiple of 9. Given that it's a perfect cube, 19,683 must be a multiple of 3^3 = 27. Dividing by that gives 729, or 9^3, so the cube root is 3 * 9=27. Lastly, it's possible to dredge up that e^3 is about 20, so (27.1828...)^3 is about 20,000, and it's plausible that 27 is the cube root we're after.
- cperciva 4y agoMy approach: ln(19683) ~ ln(20000) = ln(20) + 3 ln(10) ~ 3 + 3*2.3 = 9.9. 3.3 = 1.0 + 2.3 ~ ln(e) + ln(10). My mental landmarks are ln(2), ln(e), and ln(10), roughly 0.7, 1.0, and 2.3 respectively.
- colinbeveridge 4y agoNice. I like ln(3) and ln(5) (1.1 and 1.6) as well.
- cperciva 4y agoYeah, ln(3) is useful, although you can also get it from ln(1+x) ~ x. I don't bother remembering ln(5) though; it's just ln(10) - ln(2) anyway.
- cozzyd 4y agoYeah if you work a lot with dB it's straightforward to do it this way.
- notacoward 4y agoYes! Knowing some basic logs is really handy for lots of quick calculations involving larger numbers, not just this one. Highly recommend. My first thought for how to handle this one was to use logs, which would work even if the original number isn't a perfect cube. Then, since it is, you can use the last-digit trick to zero in from that first approximate answer.
- crtified 4y agoMe learning the article's method: 5 minutes of reading, hmm, simple. Me attempting to even read your method: *idiotic blank stare*
- mafuy 4y agoThis might help: https://news.ycombinator.com/item?id=34652483 https://news.ycombinator.com/item?id=34652483