summaryrefslogtreecommitdiff
path: root/fpcdocs/mathex/ex22.pp
blob: 757e5e9df817b1712280fe2b1d055efe39c61a23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Program Example22;

{ Program to demonstrate the log2 function. }

Uses math;

begin
  Writeln(Log2(2):8:4);
  Writeln(Log2(4):8:4);
  Writeln(Log2(8):8:4);
  Writeln(Log2(1):8:4);
  Writeln(Log2(0.5):8:4);
  Writeln(Log2(0.25):8:4);
  Writeln(Log2(0.125):8:4);
end.