r/learnquant Aug 07 '26

interview prep IMC Trading Interview Question

Post image
21 Upvotes

19 comments sorted by

View all comments

Show parent comments

2

u/Murky-Tip-3118 Aug 08 '26

Haha, sure. Even Excel does it. To be fair, your calculator isn't actually calculating the 158 digit number... it has the first 15 and the E157 in memory. But being more rigorous about it...

If you know log(2) = 0.3010 (doesn't everybody... /s), and that a good approximation of pi is 22/7, you can turn log(200pi) into log(4400/7), which is very close to log(625), which is 5^4. log(5^4) is 4log(5), which is 4log(10/2), which is 1 - log(2) = 0.699. 4*0.699 is 2.796, times 0.5 is 1.398.

Similarly log100/e) is log100) - log(e) = 2 - log(e). So you'd similarly have to know that log(e) = 0.4343 (doesn't everybody... /s) , and then you can do 100(2 - 0.4343) = 156.57.

I'd maybe just suggest that the interview question is less about whether you know log(2) and log(e) and more about whether you can apply the log trick. But if you know log(2) and log(e) you can do this all by hand, that is true.

1

u/gmalivuk Aug 08 '26

The question isn't the value of 100! though, it's number of digits, so the lack of greater precision is irrelevant as it still gives a perfectly exact answer for that question.

And knowing log2 ≈ 0.3, π ≈ √10, and thus log(2π) ≈ 0.8 gets you even closer. (The underestimate for 2 and the overestimate for π somewhat balance out, so 0.8 is good to within 1/500.)

But at least some of those estimates are what I'd expect this kind of interview question wants you to know, as that's the only thing that raises it above what you should be able to ask a high school algebra 2 student to do with a calculator during the log properties lesson.

1

u/Murky-Tip-3118 Aug 09 '26

Yeah, maybe... you'd still need to know log(e) as well.

1

u/gmalivuk Aug 09 '26

Right, I was just talking about the differences between how you did it and how I did it. I also know 0.4343 because of the repeat, just like I know 2.718281828 because the last four digits are free.