2 On MC, LOAD("spangl")$ to batch MC:SHARE1;SPANGL MACSYM.
3 On a lispm, LOAD("NIMBUS:>MACSYMA>SHARE>SPANGLES.MACSYMA")$
4 (lispm LOAD still needs work).
6 Then trigfun(rational*%PI) will range-reduce so that 0 < rational < %PI/4,
7 and will then convert to an equivalent algebraic expression, whenever this
8 can be done without nesting radicals. E.g.
10 TAN(17*%PI/24) becomes - (SQRT(2) - 1) (SQRT(3) + SQRT(2)) .
12 This set of rules is similar to SHARE1;NTRIG, except that NTRIG produces
13 some nested radicals, misses some non-nested radicals, doesn't range-reduce,
14 and leaves surds in denominators. Also, SPANGL uses %PHI (the golden ratio)
15 in cases where NTRIG uses SQRT(5). If people dislike this enough, I'll
16 (grumpily) change it to use SQRT(5). - RWG