mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-12 20:09:30 +01:00
+ sincos test
git-svn-id: trunk@5808 -
This commit is contained in:
parent
f6fe70ae0c
commit
abdcb8cdf2
@ -27,6 +27,7 @@ const
|
|||||||
var
|
var
|
||||||
i : integer;
|
i : integer;
|
||||||
Delta,Ref,Value : Double;
|
Delta,Ref,Value : Double;
|
||||||
|
Ref2,Value2,Dummy : Float;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
for i:=1 to dim do
|
for i:=1 to dim do
|
||||||
@ -107,6 +108,20 @@ for i:=-1 downto -8 do
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
writeln('Testing SINCOS');
|
||||||
|
for i:=1 to dim do
|
||||||
|
begin
|
||||||
|
sincos(pi/2-i*10/180*pi,Ref2,Dummy);
|
||||||
|
sincos(i*10/180*pi,Dummy,Value2);
|
||||||
|
Delta := Value2 - Ref2;
|
||||||
|
if Abs(Delta) > 1E-15 then
|
||||||
|
begin
|
||||||
|
writeln(' Error for Cos(',i*10,') was:',Value2,' should be:',Ref2) ;
|
||||||
|
halt(1);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
writeln('Tan +/- 90 deg test:');
|
writeln('Tan +/- 90 deg test:');
|
||||||
writeln('tan(89.999):',tan(89.999/180*pi));
|
writeln('tan(89.999):',tan(89.999/180*pi));
|
||||||
writeln('tan(90.000):',tan(90.000/180*pi));
|
writeln('tan(90.000):',tan(90.000/180*pi));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user