Linear display not correct?



Ray wrote:
> I don't understand quoting, but I see that

> (%i4) '(sin(1.0));
> (%o4)                          .8414709848078965

> So maybe that's the way it's supposed to work?

I had a look in the documentation. We find:

The single quote does not prevent simplification. 

(%i1) sin (17 * %pi) + cos (17 * %pi);
(%o1)                          - 1
(%i2) '(sin (17 * %pi) + cos (17 * %pi));
(%o2)                          - 1

So the simplification of '(sin(1.0)) or of the Gamma function '(gamm(0.5)) is
expected.

I think this seems to be only true for functions which have an alias and a
reversealias on the property list. These functions are allready translated by
the parser to a noun form.

Functions which don't have an alias and reversealias are not automatically
transformed to a noun form by the parser.

/* read and readonly gives the noun form for the Sin function
   which is quoted. The functions simplify. */

(%i13) :lisp ($read)
'(sin(x));
((%SIN SIMP) $X)

(%i13) :lisp ($readonly)
'(sin(x));
((MQUOTE) ((%SIN) $X))

/* But not for the Bessel function.
   The function don't simplify. */

(%i13) :lisp ($readonly)
'(bessel_j(n,x));
((MQUOTE) (($BESSEL_J) $N $X))

(%i13) :lisp ($read)
'(bessel_j(n,x));
(($BESSEL_J SIMP) $N $X)

/* without a quot we get simplification */

(%i13) :lisp ($read)
bessel_j(n,x);
((%BESSEL_J SIMP) $N $X)

That's all a bit confusing.

Dieter Kaiser