if x*(y+z)=x*y+x*z then print(true) else print(false); yields false
Subject: if x*(y+z)=x*y+x*z then print(true) else print(false); yields false
From: Stavros Macrakis
Date: Fri, 25 Feb 2011 13:18:24 -0500
The operator "=" in Maxima denotes syntactic equality. Use equal(...) for
semantic equality:
(%o1) if equal(x*(y+z),x*y+x*z) then print(true) else print(false);
true
(%o2) true
(%i3) is( equal(x*(y+z),x*y+x*z) );
(%o3) true
On Fri, Feb 25, 2011 at 13:14, Paul Breen <greenbreen at yahoo.com> wrote:
> Hello,
>
> I'm just getting started with Maxima, so maybe my confusion is a result of
> my lack of familiarity with the system, but it seems to me that the
> statement:
>
> if x*(y+z)=x*y+x*z then print(true) else print(false);
>
> ought to return true. Is Maxima just trying to be extremely general by not
> assuming that the "+" operator is normal addition, or is this a bug?
>
> --Paul Breen
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>