Yes, it is accurate. You could also show the same thing with '+', which
might motivate the behavior better:
1+2.0 => 3.0
'(1+2.0) => 3.0
'(x+1+2.0) => x+3.0
Note that in the last case, there is no subexpression (subtree) 1+2.0 which
could be a separate function call.
I think this all belongs to a section on simplification in general, which
clarifies that x+1+2.0 == "+"(x,1,2.0) and that Maxima applies
simplification to all mathematical operators. The section should also
cross-reference pattern-matching as a way of users' defining simplifying
mathematical functions.
-s
On Mon, Oct 5, 2009 at 11:34 AM, Leo Butler <l.butler at ed.ac.uk> wrote:
>
>
> On Mon, 5 Oct 2009, Stavros Macrakis wrote:
>
> < Maxima distinguishes between mathematical functions (like sin, abs, etc.)
> < and computational routines (like factor, ratsimp, etc.).
> <
> < Mathematical functions are not "evaluated", but "simplified": sin(%pi) =>
> 0
> < by simplification, sin(3.14) => 0.002 by simplification, etc. This is an
> < important and fundamental concept in Maxima.
>
> Is this accurate?
>
> Maxima considers floating point operations by its in-built
> mathematical functions to be a simplification.
>
> @c ===beg===
> @c sin(1.0);
> @c '(sin(1.0));
> @c ===end===
> @example
> (%i1) sin(1.0);
> (%o1) .8414709848078965
> (%i2) '(sin(1.0));
> (%o2) .8414709848078965
> @end example
>
>
> Leo
>
> --
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
>