DataMuseum.dk

Presents historical artifacts from the history of:

RC4000/8000/9000

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about RC4000/8000/9000

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦fcb34bddc⟧ TextFile

    Length: 768 (0x300)
    Types: TextFile
    Names: »tspln3val«

Derivation

└─⟦00964e8f7⟧ Bits:30007478 RC8000 Dump tape fra HCØ.
    └─⟦b2ec5d50f⟧ 
        └─⟦09b4e9619⟧ »thcømat« 
            └─⟦this⟧ 

TextFile

\f



message spln3val

spln3val=algol message.no
cubic spline value
external
real procedure spln3val(x,X,Y,M,n);
value n,x; real x; integer n; array X,Y,M;
begin
  real xp,xm;
  own integer i;
  if x<X(1) or x>X(n) then alarm(<:<10>***spln3val illegal x = :>,
  string exactlay(x,i,x),x);
  if i>=n then i:=0;
  for xp:=X(i+1)-x while xp<=0 and i<n-1 do i:=i+1;
  for xm:=x-X(i) while xm<0 do
  begin
    xp:=-xm; i:=i-1
  end;
  spln3val:=Y(i)+xm*((Y(i+1)-Y(i))/(xm+xp)
  -xp/6*(M(i)+M(i)+M(i+1)+(M(i+1)-M(i))*xm/(xm+xp)))
end spln3val
; end
▶EOF◀