|
|
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: 1130 (0x46a)
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 Sin (X : Float_Type) return Float_Type is
-- On input, X is a floating-point value in Float_Type;
-- On output, the value of sin(X) (the sine of X) is returned.
Y, R1, R2, Sign_Y, 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
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;
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 (Sign_Y * Z));
end Sin;