I am trying to get the factorial of very large numbers, but I only care about the last 5 digits before the trailing zeros. So, I was hoping to do this:
rtz =: %&10 ^: (0: = 10&|) ^:_ NB. remove trailing zeros of y f =: 100000&| @ rtz @ */@:>:@i. NB. get the last 5 non-zero digits of y Though I am not sure that it is doing exactly as I was hoping. My question is, does f do 100000&| @ rtz in between every multiplication or does it actually only apply itself at the end once? Thanks. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
