mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-02 20:30:29 +02:00
+ sincos test
git-svn-id: trunk@5808 -
This commit is contained in:
parent
f6fe70ae0c
commit
abdcb8cdf2
@ -27,6 +27,7 @@ const
|
||||
var
|
||||
i : integer;
|
||||
Delta,Ref,Value : Double;
|
||||
Ref2,Value2,Dummy : Float;
|
||||
|
||||
begin
|
||||
for i:=1 to dim do
|
||||
@ -107,6 +108,20 @@ for i:=-1 downto -8 do
|
||||
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(89.999):',tan(89.999/180*pi));
|
||||
writeln('tan(90.000):',tan(90.000/180*pi));
|
||||
|
Loading…
Reference in New Issue
Block a user