Skip to content

Instantly share code, notes, and snippets.

@abscondment
Created November 25, 2010 07:43
Show Gist options
  • Save abscondment/715046 to your computer and use it in GitHub Desktop.
Save abscondment/715046 to your computer and use it in GitHub Desktop.
(defn stirling-big [#^Integer n]
(.multiply
(BigDecimal. (Math/sqrt (* 2 Math/PI n)))
(.pow (.divide (BigDecimal. n)
(BigDecimal. Math/E)
java.math.MathContext/DECIMAL128)
n java.math.MathContext/DECIMAL128)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment