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

⟦0481580b7⟧ Ada Source

    Length: 3072 (0xc00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, function Tan, seg_0130e4, 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 Tan (X : Float_Type) return Float_Type is

-- On input, X is a floating-point value in Float_Type;
-- On output, the value of tan(X) (the tangent of X) is returned.

   Y, R1, R2, Sign_Y, Z, U, V : Common_Float;
   I_Flag, Sc_Flag            : Quadrant_Flag;

   Large_Threshold : constant Common_Float :=
      Common_Float (Radix) ** (Float_Type'Machine_Mantissa / 2);

   Two_Pi : constant Common_Float :=
      6.28318_53071_79586_47692_52867_66559_00576_83943_38798_75016;

begin

-- Argument reduction by KP_Pi2Rd

   if (X = 0.0) then
      return (X);
   end if;

   Y := Common_Float (X);

   if (abs (Y) > Large_Threshold) then
      Y := Y rem Two_Pi;
   end if;

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


   Kp_Pi2rd (Y, R1, R2, I_Flag);

   Sc_Flag := I_Flag mod 2;

   U := Kf_Sin (R1, R2);
   V := Kf_Cos (R1, R2);

   if (Sc_Flag = 0) then
      Z := U / V;
   else
      Z := -V / U;
   end if;

   return (Float_Type (Sign_Y * Z));

end Tan;


E3 Meta Data

    nblk1=2
    nid=0
    hdr6=4
        [0x00] rec0=2d rec1=00 rec2=01 rec3=00a
        [0x01] rec0=0d rec1=00 rec2=02 rec3=000
    tail 0x2150db64a82b1523442aa 0x42a00066462061e03