arr: [a,a*b]$
arrgcd: xreduce('gcd, arr) => a <<< important to quote "gcd"
listarith: false$ <<<<< prevents a*[1,b] from becoming [a,a*b]
arrgcd * block([listarith:true], arr/arrgcd) <<< block makes listarith
true locally
*or alternatively*
arrgcd * makelist(i/arrgcd,i,arr)
Be aware of some possibly non-intuitive behavior of gcd, e.g. gcd(a,b/a) =>
1/a, not 1; gcd(1/a,1/b) => 1/(a*b); gcd(a^n,a^m) => 1, not a^min(n,m), etc.
Does that solve your problem?
-s
On Sat, Dec 15, 2012 at 4:04 PM, Burgess, Don <deburgess at asbury.edu> wrote:
> How do you factor an array?
>
> factor( [a, a*b])
>
> a*[1,b]
>
>
>
>
> Thank you very much,
> don burgess
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>