It's not a laptop limit. I know LFACT is in SAS 9.2, so you must have an earlier version of SAS that doesn't contain LFACT. No problem. Since n! is a product, log(n!) is just a sum. You can write your own LFACT function, which I'll call LogFact in order to avoid confusion:

start LogFact(n);
return( sum(log(1:n)) );
finish;

Define and use the LogFact function instead of LFACT in the algorithm and you're good to go!