Calculates factorials with exact precision. Don't use huge numbers. This uses a workaround for scratch's multiplication system that avoids the rounding errors of large numbers.