Skip to main content
The 2024 Developer Survey results are live! See the results
3 votes

A simple performant factorial function

The function should hopefully run efficiently for calculating a very large number's factorial. Perhaps, but: you can take the factorial of 170, but after that the ...
user555045's user avatar
  • 10.2k
1 vote

Efficiently generate a random position inside an outer rectangle but outside an inner rectangle

I cannot find a superior algorithm than the one you have adopted to calculate this any faster. Essentially my idea was the same as yours: Identify four regions around the hole. Caluclate the area of ...
Attack68's user avatar
  • 545

Only top scored, non community-wiki answers of a minimum length are eligible