summaryrefslogtreecommitdiff
path: root/packages/numlib/tests/spesgnte.pas
blob: cd472d1f4203c5919da37a7de620db2d4277839a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
program spesgnte;

uses
  spe,
  typ;

var
  x: ArbFloat;
  h: string;
  t: ArbInt;
begin
  Write('program results spesgnte');

  case SizeOf(ArbFloat) of
    4: writeln('(single)');
    8: writeln('(double)');
    6: writeln('(real)');
  end;

  x := pi;
  Str(x, h);
  t := Length(h) - 1;

  writeln;
  writeln('': t div 2, 'x', '': t - 3, 'spesgn(x)');
  writeln;

  while not EOF do
  begin
    readln(x);
    writeln(x, ' ': t div 2, spesgn(x));
  end;

end.