summaryrefslogtreecommitdiff
path: root/support/dktools/test-dk4c8dbl.ctr
blob: 75d281e15b2ca45fc5d484b7c81efc0221da0fe1 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102

#include <stdio.h>

#include "dk4c8dbl.h"


$!trace-include



static const char * const	test_strings[] = {
$!string-table
1.0
0.1
0.01
10.0
100.0
1.00500
0.10500
0.010500
10.00500
100.00500
100.00500e-5
100.00500e-4
100.00500e-3
100.00500e-2
100.00500e-1
100.00500
100.00500e1
100.00500e2
100.00500e3
100.00500e4
100.00500e5
100.00500e6
100.00500e7
100.00500e8
100.00500e9
1.25e3
1.25e2
1.25e1
1.25e0
1.25e-1
1.25e-2
1.25e-3
-1.0
-0.1
-0.01
-10.0
-100.0
-1.00500
-0.10500
-0.010500
-10.00500
-100.00500
-100.00500e-5
-100.00500e-4
-100.00500e-3
-100.00500e-2
-100.00500e-1
-100.00500
-100.00500e1
-100.00500e2
-100.00500e3
-100.00500e4
-100.00500e5
-100.00500e6
-100.00500e7
-100.00500e8
-100.00500e9
-1.25e3
-1.25e2
-1.25e1
-1.25e0
-1.25e-1
-1.25e-2
-1.25e-3
000500e3
5.50500000
000500
$!end
};

int main(int argc, char *argv[])
{
	const char * const	*ptr;

	$!trace-init test-ppptf.deb
	$? "+ main"
	ptr = test_strings;
	while (NULL != *ptr) {
		fputs(*ptr, stdout);
		fputc('\n', stdout);
		dk4c8dbl_str_double_to_file(stdout, *ptr, NULL);
		fputc('\n', stdout);
		fputc('\n', stdout);
		ptr++;
	}
	$? "- main"
	$!trace-end
	return 0;
}