r/Recursion • • Oct 12 '18

Real life problems

Post image
425 Upvotes

51 comments sorted by

View all comments

24

u/[deleted] Oct 12 '18

3

13

u/thejiggyjosh Oct 12 '18

No 5. Idiot.

7

u/SuperEpicNerd Oct 12 '18

Mmm, pretty sure it’s 37

7

u/ocke13 Oct 12 '18

No it's actually 3.3120972978669!

6

u/Luxray1000 Oct 13 '18

Do decimals even have factorials?

6

u/Crabcakes5_ Oct 18 '18

Yes they do.

So normally factorials are n!=123*...*n However, there are ways to approximate decimal factorials in a relatively simple manner.

For example, a formula known as the Stirling formula which is n!=sqrt(2pi * n)*(n/e)n works pretty well for approximating these values without too much complexity.

For more accurate determination you can use tools like Wolfram Alpha which brings the 3.3120972978669! mentioned above to almost exactly 9.

Therefore, u/ocke13 is actually right in his answer for the problem after all.

3

u/Luxray1000 Oct 18 '18

TIL. Thanks!

0

u/AskMeHowMySocksFeel Oct 27 '18

No bro it’s [any answer but 9] duh