|
|
DataMuseum.dkPresents historical artifacts from the history of: RC4000/8000/9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC4000/8000/9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 1536 (0x600)
Types: TextFile
Names: »clenshawtx«
└─⟦621cfb9a2⟧ Bits:30002817 RC8000 Dump tape fra HCØ. Detaljer om "HC8000" projekt.
└─⟦0364f57e3⟧
└─⟦80900d603⟧ »giprocfile«
└─⟦00964e8f7⟧ Bits:30007478 RC8000 Dump tape fra HCØ.
└─⟦b2ec5d50f⟧
└─⟦80900d603⟧ »giprocfile«
└─⟦this⟧
; clenshawtx * page 1 22 11 77, 9.31;
; clenshaw
if listing.yes
char 10 12 10
clenshaw = set 1
clenshaw = algol
external real procedure clenshaw
________________________________
_ (a, g, arg, mode);
value g, arg, mode;
array a;
integer g, mode;
real arg;
comment
the procedure performs Clenshaw summation
of trigonometric and Chebyshev series.
mode = 1 - Chebyshev series.
mode = 2 - trigonometric series with
elements a(g)*sin(g*arg).
mode = 3 - trigonometric series with
elements a(g)*cos(g*arg).
clenshaw (return) real
a (call) array
coefficients in the series
g (call) integer
degree of the series
arg (call) real
argument in the series;
begin
real hr, hr1, hr2, cos_arg;
integer t, ts;
ts:=if mode = 2 then 1 else 0;
cos_arg:=if mode <> 2 and mode <> 3 then
_ 2*arg
_ else
_ 2*cos(arg);
hr:=
hr1:=0;
for t:=g step -1 until ts do
begin
hr2:=hr1;
hr1:=hr;
hr:=a(t) + cos_arg*hr1 - hr2;
end;
\f
comment clenshawtx * page 2 22 11 77, 9.31
0 1 2 3 4 5 6 7 8 9 ;
clenshaw:=if mode <> 2 then
_ hr - cos_arg*hr1/2
_ else
_ hr*sin(arg);
end clenshaw;
end
if warning.yes
(mode 0.yes
message clenshaw not ok
lookup clenshaw)
▶EOF◀