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.
Julia standard
factorial(n)
function only takes arguments up ton = 20
since the function returns anInt64
.factorial(big(n))
can be used for larger n but this will slow down calculations. So the thought is to write a functionfact(n)
which returns a Float64. This can be used up ton = 170
.