On Wed, Feb 25, 2009 at 9:25 AM, Fox, Gordon <g...@cas.usf.edu> wrote: > The tricky part isn't finding the common factors -- we knew how to do > that, though not in so concise a fashion as some of these suggestions. > It was finding all their products without what I (as a recovered Fortran > programmer) would call "truly brute force." Several of these suggestions > solve the problem nicely!
Are you sure you are not confusing *prime factors* with *factors*? My understanding is that you are looking for all the factors of A which are also factors of B, i.e. the common factors of A and B. Why else would you be computing all those products? -s ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.