DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

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

See our Wiki for more about Rational R1000/400

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦a4d1a9a08⟧ Ada Source

    Length: 3072 (0xc00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, function Kf_Sincy, seg_0130d8, separate Generic_Elementary_Functions

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 

E3 Source Code



separate (Generic_Elementary_Functions)

function Kf_Sincy (X, Cycle : Float_Type) return Float_Type is

-- On input, X is a floating-point value in Float_Type; Cycle is a
-- user specificed period.
-- On output, the value of sin(X*2pi/Cycle) is returned.

   R, Y, Sign_Y, Z, User_Period, P_Lead, P_Trail, K : Common_Float;
   Zero : Common_Float := 0.0;
   I_Flag, Sc_Flag, Pm_Flag : Quadrant_Flag;
   Two_Pi : constant := 6.28318_53071_79586_47692_52867_66559_00576_8394;

begin

-- Argument reduction by  "rem"

   Y := Common_Float (X);
   if (Y > 0.0) then
      Sign_Y := 1.0;
   else
      Sign_Y := -1.0;
      Y      := abs (Y);
   end if;
   User_Period := Common_Float (Cycle);

   if User_Period <= 0.0 then
      raise Argument_Error;
   end if;

   R := Y rem User_Period;

   K      := Round (4.0 * R / User_Period);
   I_Flag := Quadrant_Flag (Integer (K) mod 4);

   Sc_Flag := I_Flag mod 2;
   Pm_Flag := (I_Flag - Sc_Flag) / 2;

   P_Lead  := Leading_Part (User_Period, 4);
   P_Trail := User_Period - P_Lead;

   K := K * 0.25;

   R := (R - K * P_Lead) - K * P_Trail;
   R := (R / User_Period) * Two_Pi;

   if (Sc_Flag = 0) then
      Z := Kf_Sin (R, Zero);
   else
      Z := Kf_Cos (R, Zero);
   end if;

   if (Pm_Flag = 1) then
      Z := -Z;
   end if;

   return (Float_Type (Sign_Y * Z));

end Kf_Sincy;


E3 Meta Data

    nblk1=2
    nid=0
    hdr6=4
        [0x00] rec0=26 rec1=00 rec2=01 rec3=040
        [0x01] rec0=19 rec1=00 rec2=02 rec3=000
    tail 0x2150db5d282b151b82136 0x42a00066462061e03