File: atrig1.mc

package info (click to toggle)
maxima 5.6-17
  • links: PTS
  • area: main
  • in suites: woody
  • size: 30,572 kB
  • ctags: 47,715
  • sloc: ansic: 154,079; lisp: 147,553; asm: 45,843; tcl: 16,744; sh: 11,057; makefile: 7,198; perl: 1,842; sed: 334; fortran: 24; awk: 5
file content (56 lines) | stat: -rw-r--r-- 1,418 bytes parent folder | download | duplicates (2)
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
49
50
51
52
53
54
55
56
/* -*-Macsyma-*- */
EVAL_WHEN(BATCH,TTYOFF:TRUE)$
/*SHARE1;ATRIG1 1
12:01am  Friday, 14 January 1983
  Created.
*/

EVAL_WHEN(TRANSLATE,
	  TRANSCOMPILE:TRUE,
	  DEFINE_VARIABLE:'MODE)$

PUT('ATRIG1,1,'VERSION)$

/* Variable definitions */

DEFINE_VARIABLE(PIOVER4,%PI/4,ANY)$
DEFINE_VARIABLE(PIOVER3,%PI/3,ANY)$
DEFINE_VARIABLE(PIOVER6,%PI/6,ANY)$
DEFINE_VARIABLE(SQRT3,SQRT(3),ANY)$
DEFINE_VARIABLE(SQRT2,SQRT(2),ANY)$
DEFINE_VARIABLE(ANGLES_KNOWN_FOR_ATRIG,[0,PIOVER6,PIOVER4,PIOVER3,%PI/2],
		ANY)$

/* For %PI/4 */

TELLSIMPAFTER(ACOS(1/SQRT2),PIOVER4)$
TELLSIMPAFTER(ACOS(SQRT2/2),PIOVER4)$
TELLSIMPAFTER(ASEC(SQRT2),PIOVER4)$
TELLSIMPAFTER(ACSC(SQRT2),PIOVER4)$
TELLSIMPAFTER(ASIN(1/SQRT2),PIOVER4)$
TELLSIMPAFTER(ASIN(SQRT2/2),PIOVER4)$

/* For %PI/3 */

TELLSIMPAFTER(ASIN(SQRT3/2),PIOVER3)$
TELLSIMPAFTER(ATAN(SQRT3),  PIOVER3)$
TELLSIMPAFTER(ACOT(1/SQRT3),PIOVER3)$
TELLSIMPAFTER(ACOT(SQRT3/3),PIOVER3)$
TELLSIMPAFTER(ACSC(2*SQRT3/3),PIOVER3)$
TELLSIMPAFTER(ACSC(2/SQRT3),PIOVER3)$
TELLSIMPAFTER(ASEC(2),PIOVER3)$

/* For %PI/6 */

TELLSIMPAFTER(ACOS(SQRT3/2),PIOVER6)$
TELLSIMPAFTER(ATAN(SQRT3/3),PIOVER6)$
TELLSIMPAFTER(ATAN(1/SQRT3),PIOVER6)$
TELLSIMPAFTER(ACOT(SQRT3),  PIOVER6)$
TELLSIMPAFTER(ASEC(2/SQRT3),PIOVER6)$
TELLSIMPAFTER(ASEC(2*SQRT3/3),PIOVER6)$
TELLSIMPAFTER(ACSC(2),        PIOVER6)$

/* Could also do  [1,5,7,11]*%PI/12 if there is ever demand for it. */

EVAL_WHEN(BATCH,TTYOFF:FALSE)$