I took a quick look... I'd be tempted to write factors more like this:
odometer =: #: i.@(*/) factors=: (*/@:^"1 odometer@:>:)/@q:~&__ odometer is from the J wiki. If the original argument was accurate there is no need to force factors to be extended precision. Another issue is that I am more comfortable grouping the operations this way. Also, why bother sorting? Thanks, Raul On Fri, Apr 19, 2013 at 10:32 PM, David Ward Lambert <[email protected]> wrote: > http://rosettacode.org/wiki/Vampire_number#J > http://rosettacode.org/wiki/Harshad_or_Niven_series#J > Vampiric numbers are dreadfully inefficient, I made no effort to follow > the algorithmic advice given in the Vampire search algorithm link. > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
