|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: B T
Length: 1232 (0x4d0)
Types: TextFile
Names: »B«
└─⟦5f3412b64⟧ Bits:30000745 8mm tape, Rational 1000, ENVIRONMENT 12_6_5 TOOLS
└─⟦91c658230⟧ »DATA«
└─⟦458657fb6⟧
└─⟦1472c4407⟧
└─⟦this⟧
└─⟦d10a02448⟧ Bits:30000409 8mm tape, Rational 1000, ENVIRONMENT, D_12_7_3
└─⟦fc9b38f02⟧ »DATA«
└─⟦9b46a407a⟧
└─⟦2e03b931c⟧
└─⟦this⟧
separate (Generic_Elementary_Functions)
function Kf_Coscy (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 cos(X*2pi/Cycle) is returned.
R, 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 := abs (Common_Float (X));
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) + 1) 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 (Z));
end Kf_Coscy;