documentation



On Tuesday 30 December 2008 06:10:05 Robert Dodier wrote:
> i think it makes more sense to have update_examples emit
> the @group stuff, rather than running it separately.

OK, I changed update_examples.

I'm processing .texi by update_examples (with CVS version of Maxima)
and doing `diff` against the old versions. Here are some things
I discovered:

1. In Trigonometric.texi:

(%i1) declare(j, integer, e, even, o, odd)$

(%i2) sin(x + (e + 1/2)*%pi);
                                       1
(%o2)                 sin(x + %pi (e + -))
                                       2
(%i3) sin(x + (o + 1/2)*%pi);
                                       1
(%o3)                 sin(x + %pi (o + -))
                                       2

Was:

(%i1) declare(j, integer, e, even, o, odd)$
(%i2) sin(x + (e + 1/2)*%pi);
(%o2)                        cos(x)
(%i3) sin(x + (o + 1/2)*%pi);
(%o3)                       - cos(x)

(Is it a regression?)


2. The input lines in Differential.texi are highlighted like

  (%i1) @b{@t{x^2*'diff(y,x) + 3*y*x = sin(x)/x;}}

But it (1) conflicts with typesetting of the other sections and
(2) will be lost after update_examples.


3. In Matrices.texi:

(%i1) declare ([aa, bb], real, cc, complex, ii, imaginary);
(%o1)                         done
(%i2) conjugate (aa + bb*%i);
(%o2)                      aa - %i bb
(%i3) conjugate (cc);
(%o3)                     conjugate(cc)
(%i4) conjugate (ii);
(%o4)                         - ii
(%i5) conjugate (xx + yy);
(%o5)                        yy + xx

Was:

(%i1) declare ([aa, bb], real, cc, complex, ii, imaginary);

(%o1)                         done
(%i2) conjugate (aa + bb*%i);

(%o2)                      aa - %i bb
(%i3) conjugate (cc);

(%o3)                     conjugate(cc)
(%i4) conjugate (ii);

(%o4)                         - ii
(%i5) conjugate (xx + yy);

(%o5)             conjugate(yy) + conjugate(xx)

(I guess the new result is correct since xx and yy are assumed real.)


4. For simplifications.texi, ./update_examples skips some input lines:

< (%o2)                               a >= 4
< (%i3) (b>c)+%; /* add a second, strict inequality */
< (%o3)                            b + a > c + 4
< (%i4) 7*(x<y); /* multiply by a positive number */
< (%o4)                              7 x < 7 y
< (%i5) -2*(x>=3*z); /* multiply by a negative number */
< (%o5)                           - 2 x <= - 6 z
< (%i6) (1+a^2)*(1/(1+a^2)<=1); /* Maxima knows that 1+a^2 > 0 */
<                                         2
< (%o6)                             1 <= a  + 1
< (%i7) assume(x>0)$ x*(2<3); /* assuming x>0 */
< (%o7)                              2 x < 3 x
< (%i8) a>=b; /* another inequality */
< (%o8)                               a >= b
< (%i9) 3+%; /* add something */
< (%o9)                           a + 3 >= b + 3
< (%i10) %-3; /* subtract it out */
< (%o10)                              a >= b
< (%i11) a>=c-b; /* yet another inequality */
< (%o11)                            a >= c - b
< (%i12) b+%; /* add b to both sides */
< (%o12)                            b + a >= c
< (%i13) %-c; /* subtract c from both sides */
< (%o13)                         - c + b + a >= 0
< (%i14) -%;  /* multiply by -1 */
< (%o14)                          c - b - a <= 0
< (%i15) (z-1)^2>-2*z; /* determining truth of assertion */
<                                       2
< (%o15)                         (z - 1)  > - 2 z
< (%i16) expand(%)+2*z; /* expand this and add 2*z to both sides */
<                                    2
< (%o16)                            z  + 1 > 0
< (%i17) %,pred;
< (%o17)                               true
---
> (%o2)                        a >= 4
> (%o3)                     b + a > c + 4
> (%o4)                       7 x < 7 y
> (%o5)                    - 2 x <= - 6 z
>                                  2
> (%o6)                      1 <= a  + 1
> (%o8)                       2 x < 3 x
> (%o9)                        a >= b
> (%o10)                   a + 3 >= b + 3
> (%o11)                       a >= b
> (%o12)                     a >= c - b
> (%o13)                     b + a >= c
> (%o14)                  - c + b + a >= 0
> (%o15)                   c - b - a <= 0
>                                2
> (%o16)                  (z - 1)  > - 2 z
>                             2
> (%o17)                     z  + 1 > 0
> (%o18)                        true
> @end group
> (%i19) (b>c)+%; /* add a second, strict inequality */

I'm not sure what happens here. I thought it's a bug in 
update_examples, possibly caused by my modifications, but the old 
version of update_examples gives the same result. Maybe it is because 
of some problem with my Maxima installation.


5. The examples in simplex.texi are missing load(simplex) which is bad 
for automatically generated examples and possibly for a reader.


6. orthopoly.texi splits Maxima sessions into different @example 
blocks. I think @c ===beg=== / @c ===end=== is not correct here.


7. In stringproc.texi "openw("E:/file.txt");" on input gives "The path 
maxima/doc/info/E:/file.txt does not exist." Maybe it is because of a 
strange path with "E:".


8. The linear algebra stuff contains a lot of messages from "rat" in 
the output. Should we set ratprint : fase for update_examples?

-- 
Prickle Prickle, Aftermath 72 YOLD 3174
Alexey Beshenov  http://beshenov.ru/