Test suite results for test file test/units/math/ttrig1.pp

Test run data :

Run ID:
Operating system: linux
Processor: aarch64
Version: 3.3.1
Fails/OK/Total: 33/9212/9245
Version: 3.3.1
Full version: 3.3.1-15587-g490a8c68ea-unpushed
Comment: -XR/home/muller/sys-root/aarch64-linux -Xd -Xr/home/muller/sys-root/aarch64-linux
Machine: cfarm13
Category: 1
SVN revisions: 490a8c68ea:8b7dbb81b1:3f8bbd3b00:2f9ed0576e
Submitter: muller
Date: 2024/04/19 10:55:00
Previous run: 934300
Next run: 935633

Hide skipped tests

Hide successful tests

Test file "test/units/math/ttrig1.pp" information:

t_id 1448
t_adddate 2005/01/13
t_result 0
t_knownrunerror 0

Detailed test run results:

tr_idruntr_oktr_skiptr_result
443621227934959TrueFalseSuccessfully run

Record count: 1

No log of 934959.

Source:

program test03;

uses
{$IFDEF CPU86}
  CMem,
{$ENDIF}
  SysUtils,Math;

const

 dim = 36;
 MaxFloat = 1.1000000000000000E+4932;

 // from dcc
 sinus : array[1..dim] of double = (
 1.7364817766693035E-0001, 3.4202014332566873E-0001, 5.0000000000000000E-0001, 6.4278760968653933E-0001,
 7.6604444311897804E-0001, 8.6602540378443865E-0001, 9.3969262078590838E-0001, 9.8480775301220806E-0001,
 1.0000000000000000E+0000, 9.8480775301220806E-0001, 9.3969262078590838E-0001, 8.6602540378443865E-0001,
 7.6604444311897804E-0001, 6.4278760968653933E-0001, 5.0000000000000000E-0001, 3.4202014332566873E-0001,
 1.7364817766693035E-0001,-5.4210108624275222E-0020,-1.7364817766693035E-0001,-3.4202014332566873E-0001,
-5.0000000000000000E-0001,-6.4278760968653933E-0001,-7.6604444311897804E-0001,-8.6602540378443865E-0001,
-9.3969262078590838E-0001,-9.8480775301220806E-0001,-1.0000000000000000E+0000,-9.8480775301220806E-0001,
-9.3969262078590838E-0001,-8.6602540378443865E-0001,-7.6604444311897804E-0001,-6.4278760968653933E-0001,
-5.0000000000000000E-0001,-3.4202014332566873E-0001,-1.7364817766693035E-0001, 1.0842021724855044E-0019
 );

var
  i : integer;
  Delta,Ref,Value : Double;

begin
for i:=1 to dim do
  begin
  // Generate constant array above output
  write(sin(i*10/180.0*pi),',');
  if i mod 4 = 0 then writeln;
  end;


writeln('Testing SIN');
for i:=1 to dim do
  begin
  Ref:=sinus[i];
  Value:=sin(i*10/180.0*pi);
  Delta := Value - Ref;
  if Abs(Delta) > 1E-15 then
    begin
      writeln('  Error for Sin(',i*10,') was:',Value,' should be:',Ref) ;
      halt(1);
    end;
  end;


writeln('Testing COS');
for i:=1 to dim do
  begin
  Ref := sin(pi/2-i*10/180*pi);
  Value := cos(i*10/180*pi);
  Delta := Value - Ref;
  if Abs(Delta) > 1E-15 then
    begin
      writeln('  Error for Cos(',i*10,') was:',Value,' should be:',Ref) ;
      halt(1);
    end;
  end;


writeln('Testing TAN');
for i:=1 to dim do
  begin
    if i=9 then Ref := MaxFloat
    else if i=27 then Ref := -Maxfloat
    else Ref:=sin(i*10/180*pi)/cos(i*10/180*pi);
    Value := tan(i*10/180*pi);
    Delta := Value - Ref;
    if Abs(Delta) > 1E-15 then
      begin
        writeln('  Error for Tan(',i*10,') was:',Value,' should be:',Ref) ;
        halt(1);
      end;
  end;


writeln('Testing ARCTAN...');
for i:=1 to 8 do
  begin
  Ref := i*10;
  Value := arctan(tan(i*10/180*pi))/pi*180;
  Delta := Value - Ref;
  if Abs(Delta) > 1E-14 then
    begin
      writeln('  Error for ArcTan(',i*10,') was:',Value,' should be:',Ref);
      halt(1);
    end;
  end;


for i:=-1 downto -8 do
  begin
  Ref := i*10;
  Value := arctan(tan(i*10/180*pi))/pi*180;
  Delta := Value - Ref;
  if Abs(Delta) > 1E-14 then
    begin
      writeln('  Error for ArcTan(',i*10,') was:',Value,' should be:',Ref);
      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));

writeln('tan(-89.999):',tan(-89.999/180*pi));
writeln('tan(-90.000):',tan(-90.000/180*pi));

writeln('ArcTan2 kwadrants:');
writeln('Kwadrant 1 ( 1, 1):',arctan2( 1, 1)/pi*180:5:1,' deg');
writeln('Kwadrant 2 (-1, 1):',arctan2( 1,-1)/pi*180:5:1,' deg');
writeln('Kwadrant 3 (-1,-1):',arctan2(-1,-1)/pi*180:5:1,' deg');
writeln('Kwadrant 4 ( 1,-1):',arctan2(-1, 1)/pi*180:5:1,' deg');

writeln('ArcTan2 special cases:');
writeln('Kwadrant X ( 0, 0):',arctan2( 0, 0)/pi*180:5:1,' deg');
writeln('Kwadrant 1 ( 1, 0):',arctan2( 0, 1)/pi*180:5:1,' deg');
writeln('Kwadrant 2 ( 0, 1):',arctan2( 1, 0)/pi*180:5:1,' deg');
writeln('Kwadrant 3 (-1, 0):',arctan2( 0,-1)/pi*180:5:1,' deg');
writeln('Kwadrant 4 ( 0,-1):',arctan2(-1, 0)/pi*180:5:1,' deg');



end.

Link to SVN view of test/units/math/ttrig1.pp source.