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=48 Percentage= 96.00

Result type Cat. Count Percentage First date Last Date
Failed to run 2 4.0 2024/05/21 03:53:00 234 2024/05/21 04:00:00 53
i386 1 50.0 2024/05/21 03:53:00 234 2024/05/21 03:53:00 234
m68k 1 50.0 2024/05/21 04:00:00 53 2024/05/21 04:00:00 53
linux 2 100.0 2024/05/21 03:53:00 234 2024/05/21 04:00:00 53
3.3.1 2 100.0 2024/05/21 03:53:00 234 2024/05/21 04:00:00 53
Successfully run 48 96.0 2024/05/21 02:20:00 23 2024/05/21 04:32:00 54
i386 4 8.3 2024/05/21 02:38:00 25 2024/05/21 04:13:00 54
powerpc 1 2.1 2024/05/21 04:15:00 238 2024/05/21 04:15:00 238
x86_64 34 70.8 2024/05/21 02:20:00 23 2024/05/21 04:31:00 27
powerpc64 2 4.2 2024/05/21 04:24:00 57 2024/05/21 04:32:00 54
mipsel 1 2.1 2024/05/21 04:11:00 185 2024/05/21 04:11:00 185
aarch64 6 12.5 2024/05/21 02:25:00 38 2024/05/21 03:50:00 37
linux 36 75.0 2024/05/21 02:20:00 23 2024/05/21 04:32:00 54
win32 1 2.1 2024/05/21 03:02:00 25 2024/05/21 03:02:00 25
go32v2 1 2.1 2024/05/21 04:13:00 54 2024/05/21 04:13:00 54
solaris 10 20.8 2024/05/21 03:08:00 30 2024/05/21 03:35:00 27
3.3.1 33 68.8 2024/05/21 02:20:00 23 2024/05/21 04:24:00 57
3.2.3 15 31.3 2024/05/21 02:35:00 35 2024/05/21 04:32:00 54

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.