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

Test run data :

Free Pascal Compiler Test Suite Results

View Test suite results

Please specify search criteria:
File:
Operating system:
Processor:
Version
Date
Submitter
Machine
Comment
Limit
Cond
Category
Only failed tests
Hide skipped tests
List all 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:

Record count: 50

Total = 50

OK=45 Percentage= 90.00

Result type Cat. Count Percentage First date Last Date
Failed to run 5 10.0 2024/10/19 07:29:00 50 2024/10/19 10:22:00 40
i386 1 20.0 2024/10/19 09:40:00 209 2024/10/19 09:40:00 209
m68k 3 60.0 2024/10/19 07:29:00 50 2024/10/19 10:22:00 40
aarch64 1 20.0 2024/10/19 08:51:00 34 2024/10/19 08:51:00 34
linux 5 100.0 2024/10/19 07:29:00 50 2024/10/19 10:22:00 40
3.3.1 3 60.0 2024/10/19 09:40:00 209 2024/10/19 10:22:00 40
3.2.3 2 40.0 2024/10/19 07:29:00 50 2024/10/19 08:51:00 34
Successfully run 45 90.0 2024/10/19 08:05:00 45 2024/10/19 13:34:00 29
i386 3 6.7 2024/10/19 08:55:00 60 2024/10/19 10:27:00 65
sparc 3 6.7 2024/10/19 08:05:00 45 2024/10/19 10:30:00 43
powerpc 6 13.3 2024/10/19 08:40:00 51 2024/10/19 13:26:00 65
arm 2 4.4 2024/10/19 09:36:00 32 2024/10/19 10:03:00 32
x86_64 9 20.0 2024/10/19 08:27:00 30 2024/10/19 13:34:00 29
powerpc64 6 13.3 2024/10/19 08:43:00 65 2024/10/19 11:23:00 69
mips 2 4.4 2024/10/19 09:54:00 35 2024/10/19 10:28:00 38
mipsel 1 2.2 2024/10/19 10:35:00 142 2024/10/19 10:35:00 142
aarch64 5 11.1 2024/10/19 08:15:00 27 2024/10/19 09:57:00 26
sparc64 4 8.9 2024/10/19 08:33:00 120 2024/10/19 11:33:00 117
riscv64 2 4.4 2024/10/19 10:25:00 33 2024/10/19 11:10:00 26
loongarch64 2 4.4 2024/10/19 09:45:00 25 2024/10/19 10:17:00 30
linux 30 66.7 2024/10/19 08:05:00 45 2024/10/19 11:38:00 25
go32v2 3 6.7 2024/10/19 08:55:00 60 2024/10/19 10:27:00 65
solaris 4 8.9 2024/10/19 13:22:00 24 2024/10/19 13:34:00 29
aix 8 17.8 2024/10/19 08:40:00 51 2024/10/19 13:26:00 65
3.3.1 25 55.6 2024/10/19 08:05:00 45 2024/10/19 13:26:00 65
3.2.3 20 44.4 2024/10/19 08:15:00 27 2024/10/19 13:34:00 29

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.