On 3/2/2011 10:43 PM, redneb at gmx.com wrote:
> Hello all,
>
> When I enter "factor(6)" in maxima it returns "2*3" (with display2d
> set to false). I am trying to write a function that does the same
> thing, ie it returns a product as a noun. But when I define for example
>
> f(x,y) := '"*"(x,y)
>
> then f(2,3) returns
>
> '?mtimes(2,3)
no, it should return 6. It does that for me.
>
> and not 2*3. How does factor do it?
type
factor(6);
?print(%)
The factor program puts a "simp" indicator on the result, i.e. ((mtimes
simp) 2 3)
even though the expression is not really simplified.