Return sorted array of all factors of a given number.
f = all_factors(num)
num = Number to factor (>0). in
f = Array of factors of num. out
Note: all factors are returned, not just the prime factors.
R. Sterner, 2002 Apr 15
R. Sterner, 2004 Jul 27 --- Fixed to work for one prime factor.
R. Sterner, 2010 Apr 30 --- Converted arrays from () to .
Copyright (C) 2002, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.