blob: 8d66df1ffc17ef628d82feed67c9cd032bd97e26 (
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
|
#include <stdio.h>
#include "dk4numl.h"
static const size_t sizes[] = {
1, 2, 4, 8, 16, 32, 64, 65, 128, 256
};
static const size_t sz_sizes = sizeof(sizes)/sizeof(size_t);
int main(void)
{
size_t i;
for (i = 0; i < sz_sizes; i++) {
printf("Bytes: %u Unsigned: %u Signed: %u\n",
(unsigned)sizes[i],
(unsigned)dk4numlength(sizes[i], 0),
(unsigned)dk4numlength(sizes[i], 1)
);
}
return 0;
}
|