|
DataMuseum.dkPresents historical artifacts from the history of: RegneCentralen RC700 "Piccolo" |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RegneCentralen RC700 "Piccolo" Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 1280 (0x500) Types: TextFile Names: »INVERS.PAS«
└─⟦3702e543b⟧ Bits:30003064 Demoprogrammer A-J til Pascal bog └─ ⟦this⟧ »INVERS.PAS«
PROGRAM invers; VAR i : INTEGER; x : REAL; FUNCTION arcsin(x : REAL) : REAL; BEGIN IF ABS(x) < 1 THEN arcsin := ARCTAN(x / SQRT(1 - x * x)) ELSE IF x = 1 THEN arcsin := PI / 2 ELSE IF x = -1 THEN arcsin := -PI / 2; END; FUNCTION arccos(x : REAL) : REAL; BEGIN IF x = 0 THEN arccos := PI / 2 ELSE IF (0 < x ) AND (x <= 1) THEN arccos := ARCTAN(SQRT(1 - x * x) / x) ELSE IF (-1 <= x) AND (x < 0) THEN arccos := ARCTAN(SQRT(1 - x * x) / x) + PI; END; BEGIN (* invers *) WRITE(CLRHOM); WRITELN('x' : 4, 'ARCSIN(x)' : 15, 'ARCCOS(x)' : 15); WRITELN; FOR i := -10 TO 10 DO BEGIN x := i / 10; WRITELN(x : 4 : 1, arcsin(x) : 15 : 8, arccos(x) : 15 : 8); END; END. (* invers *) «eof»