1
/* Min and max float values.
2
$Id: dtostrf-minmax.c,v 1.1 2007/02/06 12:36:58 dmix Exp $
8
#define PATTERN_SIZE 50
11
PROGMEM static const struct dtostrf_s t[] = {
13
{ { 0x00800000 }, 0, 45,
14
"0.000000000000000000000000000000000000011754944" },
15
{ { 0x00800000 }, 0, 44,
16
"0.00000000000000000000000000000000000001175494" },
17
{ { 0x00800000 }, 0, 43,
18
"0.0000000000000000000000000000000000000117549" },
19
{ { 0x00800000 }, 0, 42,
20
"0.000000000000000000000000000000000000011755" },
21
{ { 0x00800000 }, 0, 41,
22
"0.00000000000000000000000000000000000001175" },
23
{ { 0x00800000 }, 0, 40,
24
"0.0000000000000000000000000000000000000118" },
25
{ { 0x00800000 }, 0, 39,
26
"0.000000000000000000000000000000000000012" },
27
{ { 0x00800000 }, 0, 38,
28
"0.00000000000000000000000000000000000001" },
29
{ { 0x00800000 }, 0, 37,
30
"0.0000000000000000000000000000000000000" },
31
{ { 0x00800000 }, 0, 36,
32
"0.000000000000000000000000000000000000" },
34
{ { 0x80800000 }, 0, 45,
35
"-0.000000000000000000000000000000000000011754944" },
36
{ { 0x00800000 }, 49, 45,
37
" 0.000000000000000000000000000000000000011754944" },
38
{ { 0x80800000 }, 49, 45,
39
" -0.000000000000000000000000000000000000011754944" },
41
#ifdef __AVR__ /* Reason: Glibc calculate all digits. */
42
{ { 0x7f7fffff }, 0, 0,
43
"340282350000000000000000000000000000000" },
44
{ { 0xff7fffff }, 0, 0,
45
"-340282350000000000000000000000000000000" },
53
for (i= 0; (size_t)i != sizeof(t)/sizeof(t[0]); i++)
54
run_dtostrf (t+i, i+1);