sp; result := 0.5 * Pi
else
result := -0.5 * Pi;
end;
function sinh(arg1:double):double;
begin
result := (exp(arg1)-exp(-arg1))*0.5;
end;
function cosh(arg1:double):double;
begin
result := (exp(arg1)+exp(-arg1))*0.5;
end;
function cot(arg1:double):double;
begin
if Abs(arg1)>0.000000001 then result := cotan(arg1) else result :=100000;
end;
function cotrad(arg1:double):double;
begin
result := cotan(DegToRad(arg1));
end;
function sec(arg1:double):double;
begin
result := 1/cos(arg1);
end;
function cosec(arg1:double):double;
begin
if Abs(arg1)>0.000000001 then result:= 1/sin(arg1) else result:=1000000;
end;
function tanrad(arg1:double):double;
begin
result := tan(DegToRad(arg1));
end;
function sinrad(arg1:double):double;
begin
result := sin(DegToRad(arg1));
end;
function cosrad(arg1:double):double;
begin
result := cos(DegToRad(arg1));
end;
function cosecrad(arg1:double):double;
begin
result := 1/sin(DegToRad(arg1));
end;
function secrad(arg1:double):double;
begin
result:= 1/cos(DegToRad(arg1));
end;
function blanc(arg1:double):double;
Var
temp,res:extended;
count:integer;
begin
Begin
res:=0;
for count := 0 to 49 do
begin
arg1:=arg1-int(arg1-(Ord(arg1<0)));
if (arg1)<0.5 then temp:=(arg1) else temp:=(1-arg1);
res:=res+ temp/(power(2,count));
arg1:=2*arg1;
end;
end;
result:=res;
end;
function min(arg1,arg2:double):double;
begin
if arg1 < arg2 then
result := arg1
else
result := arg2;
end;
function max(arg1,arg2:double):double;
begin
if arg1 < arg2 then
result := arg2
else
result := arg1;
end;
function heaviside(arg1:double):double;
begin
if arg1 < 0 then
result := 0
else
result := 1;
end;
function sign(arg1:double):double;
begin
if arg1 < 0 then
result := -1
else
if arg1 > 0 then
result := 1.0