summaryrefslogtreecommitdiff
path: root/packages/numlib/tests/speentte.pas
blob: 65067a4f78c2920af6cabd65db9fe514c5abdfbc (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 speentte;

uses
  spe,
  typ;

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

  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, 'speent(x)');
  writeln;

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

end.