Модули и объекты в языке Турбо Паскаль 7.0
if x < 0.0 then
ArcCos := Result + Pi
else
ArcCos := Result;
end;
end;
function Degrees_to_Radians(Degrees : float) : float;
begin
Degrees_to_Radians := Degrees * Radians_Per_Degree;
end;
function Radians_to_Degrees(Radians : float) : float;
begin
Radians_to_Degrees := Radians * Degrees_Per_Radian;
end;
function Sinh(x : float) : float;
var
t : float;
begin
if x > MaxValue then
Sinh := Ifinity
else
if x < -MaxValue then
Sinh := -Infinity
else
begin
t := Exp(x);
Sinh := 0.5 * (t – 1 / t);
end;
end;
function Cosh(x : float) : float;
var
t : float;
begin
if Abs(x) > MaxValue then
Cosh := Infinity
else
begin
t := Exp(x);
Cosh := 0.5 * (t + 1 / t);
end;
end;
function Tanh(x : float) : float;
begin
Tanh := Sinh(x) / Cosh(x);
end;
function Log10(x : float) : float;
begin
Log10 := Ln(x) / Ln10;
end;
function Power(x, Exponent : float) : float;
begin
if x > 0.0 then
Power := Exp(Exponent * Ln(x))
else if x = 0.0 then
Power := 0.0
else
WriteLn ( ‘ Основание степени отрицательно! ’ );
end;
begin
end.