Maxima Manual - Example Page 15 - different result for ''sin(1);



IMHO Maxima gives the correct answer and the manual isn't up to date here. 

The double quote causes one extra evaluation and just like in the case of e.g. sqrt(2) extra 
evaluation should not cause numeric results. Since there is no other symbolic value for 
sin(1), ''sin(1) should return sin(1). 
sin(1.0) returns 0.8414709848079 without extra evaluation just like sqrt(2.0) returns 
1.414213562373095

Volker van Nek

Am 18 Dec 2008 um 11:53 hat Peter Gardner geschrieben:

> 
> Hi list,
> 
> I'm on Linux, Slackware Current, running Maxima 5.16.3 using Lisp CLISP 2.46 (2008-07-02) 
> and reading "Maxima Manual Ver. 5.16.3".
> 
> Trying to understand the quote-quote operator I tried the example on page 15.
> The manual shows:
> (%i1) sin (1);
> (%o1)sin(1)
> (%i2) ''sin (1);
> (%o2)0.8414709848079
> but on my PC I get:
> (%i1) sin (1);
> (%o1)sin(1)
> (%i2) ''sin (1);
> (%o2)sin(1)
> 
> Can anybody explain why I get a different result?
> On my PC I also see this:
> (%i3) ''sin(1.0);
> (%o3).8414709848078965
> I am quite confused.
> 
> I have checked that my installation is OK.
> run_testsuite() ends with: No unexpected errors found.
> build_info() shows: Maxima version: 5.16.3
> Maxima build date: 19:42 12/5/2008
> host type: i486-slackware-linux-gnu
> lisp-implementation-type: CLISP
> lisp-implementation-version: 2.46 (2008-07-02) (built 3430482178) (memory 3437494943)
> 
> The remainder of the example gives the same results as the manual:
> (%i3) declare (foo,noun);
> (%o3)done
> (%i4) foo (x) := x - 1729;
> (%o4)''foo(x) := x - 1729
> (%i5) foo (100);
> (%o5)foo(100)
> (%i6) ''foo (100);
> (%o6)- 1629
> 
> Cheers,
> Peter
> 
> 
>