File: format.announce

package info (click to toggle)
maxima 5.47.0-9
  • links: PTS
  • area: main
  • in suites: forky
  • size: 193,104 kB
  • sloc: lisp: 434,678; fortran: 14,665; tcl: 10,990; sh: 4,577; makefile: 2,763; ansic: 447; java: 328; python: 262; perl: 201; xml: 60; awk: 28; sed: 15; javascript: 2
file content (48 lines) | stat: -rw-r--r-- 1,705 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
-*- Mode: Text -*-


  Announcing the availability of FORMAT a hierarchical expression
formatter for Macsyma*. 

From the abstract of the documentation:
  "A package for formatting algebraic expressions in Macsyma* ...
It provides facilities for user-directed hierarchical structuring of
expressions, as well as for directing simplifications to selected
subexpressions.  It emphasizes a semantic rather than syntactic description
of the desired form.  The package also provides utilities for obtaining efficiently
the coefficients of polynomials, trigonometric sums and power series."

Some examples may be clearer than words:

/* A Basic rearrangement: */
(c1) format((a+b*x)*(c-x)^2,%poly(x),%factor);
        3                2                        2
(d1) b x  - (2 b c - a) x  + c (b c - 2 a) x + a c

/* A `mathematical' alternative to map or substpart...*/
(c2) format((1+2*a+a^2)*b + a*(1+2*b+b^2),%sum,%product,%factor);
              2          2
(d2) a (b + 1)  + (a + 1)  b

/* Focussing simplifications */
(c3) foo:X^2*SIN(Y)^4-2*X^2*SIN(Y)^2+X^4*COS(Y)^4-2*X^4*COS(Y)^2+X^4+X^2+1$

(c4) trigsimp(foo);
        4    2     4         4    2       4
(d4) (x  + x ) cos (y) - 2 x  cos (y) + x  + 1

/* That helps, but this is better: */
(c5) format(foo,%poly(x),trigsimp);
       4    4       2    4
(d5) x  sin (y) + x  cos (y) + 1

The package is written in Lisp, but should run under DOE & Macsyma Inc's
versions of Macsyma.

Available by anonymous FTP at gams.nist.gov:/local/ftp/pub/miller/format/
See the README file or contact miller@cam.nist.gov

*Disclaimer: The use of commercial products or their names implies no
endorsement by NIST, the Dept. of Commerce or  the U.S. Government.