|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 3072 (0xc00) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, function Cos, seg_0130c3, separate Generic_Elementary_Functions
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
separate (Generic_Elementary_Functions) function Cos (X : Float_Type) return Float_Type is -- On input, X is a floating-point value in Float_Type; -- On output, the value of cos(X) (the cosine of X) is returned. Y, R1, R2, Z : Common_Float; I_Flag, Sc_Flag, Pm_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 Y := abs (Common_Float (X)); if (abs (Y) > Large_Threshold) then Y := Y rem Two_Pi; Y := abs (Y); end if; Kp_Pi2rd (Y, R1, R2, I_Flag); I_Flag := Quadrant_Flag ((Integer (I_Flag) + 1) mod 4); Sc_Flag := I_Flag mod 2; Pm_Flag := (I_Flag - Sc_Flag) / 2; if (Sc_Flag = 0) then Z := Kf_Sin (R1, R2); else Z := Kf_Cos (R1, R2); end if; if (Pm_Flag = 1) then Z := -Z; end if; return (Float_Type (Z)); end Cos;
nblk1=2 nid=0 hdr6=4 [0x00] rec0=26 rec1=00 rec2=01 rec3=032 [0x01] rec0=0c rec1=00 rec2=02 rec3=000 tail 0x2170e742282b15173977d 0x42a00066462061e03