bmad-sim / SimUtils.jl

Utility functions for scientific simulations.
https://bmad-sim.github.io/SimUtils.jl/
GNU Lesser General Public License v2.1
0 stars 1 forks source link

Factorial problem #4

Open DavidSagan opened 6 months ago

DavidSagan commented 6 months ago

Julia standard factorial(n) function only takes arguments up to n = 20 since the function returns an Int64. factorial(big(n)) can be used for larger n but this will slow down calculations. So the thought is to write a function fact(n) which returns a Float64. This can be used up to n = 170.