xref: /illumos-gate/usr/src/lib/libc/port/fp/__tbl_10_s.c (revision 1da57d551424de5a9d469760be7c4b4d4f10a755)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #include "lint.h"
28 #include <sys/types.h>
29 
30 /* table of 64 multiples of 10**1 */
31 const unsigned short __tbl_10_small_digits [] = { 1,
32 /* 10**1 = */
33 5 /* h    1 */,
34 /* 10**2 = */
35 25 /* h    2 */,
36 /* 10**3 = */
37 125 /* h    3 */,
38 /* 10**4 = */
39 625 /* h    4 */,
40 /* 10**5 = */
41 3125 /* h    5 */,
42 /* 10**6 = */
43 15625 /* h    6 */,
44 /* 10**7 = */
45 12589 /* h    7 */, 1 /* h   23 */,
46 /* 10**8 = */
47 62945 /* h    8 */, 5 /* h   24 */,
48 /* 10**9 = */
49 52581 /* h    9 */, 29 /* h   25 */,
50 /* 10**10 = */
51 761 /* h   10 */, 149 /* h   26 */,
52 /* 10**11 = */
53 3805 /* h   11 */, 745 /* h   27 */,
54 /* 10**12 = */
55 19025 /* h   12 */, 3725 /* h   28 */,
56 /* 10**13 = */
57 29589 /* h   13 */, 18626 /* h   29 */,
58 /* 10**14 = */
59 16873 /* h   14 */, 27596 /* h   30 */, 1 /* h   46 */,
60 /* 10**15 = */
61 18829 /* h   15 */, 6909 /* h   31 */, 7 /* h   47 */,
62 /* 10**16 = */
63 28609 /* h   16 */, 34546 /* h   32 */, 35 /* h   48 */,
64 /* 10**17 = */
65 11973 /* h   17 */, 41660 /* h   33 */, 177 /* h   49 */,
66 /* 10**18 = */
67 59865 /* h   18 */, 11692 /* h   34 */, 888 /* h   50 */,
68 /* 10**19 = */
69 37181 /* h   19 */, 58464 /* h   35 */, 4440 /* h   51 */,
70 /* 10**20 = */
71 54833 /* h   20 */, 30178 /* h   36 */, 22204 /* h   52 */,
72 /* 10**21 = */
73 12021 /* h   21 */, 19822 /* h   37 */, 45486 /* h   53 */, 1 /* h   69 */,
74 
75 /* 10**22 = */
76 60105 /* h   22 */, 33574 /* h   38 */, 30823 /* h   54 */, 8 /* h   70 */,
77 
78 /* 10**23 = */
79 38381 /* h   23 */, 36802 /* h   39 */, 23045 /* h   55 */, 42 /* h   71 */,
80 
81 /* 10**24 = */
82 60833 /* h   24 */, 52940 /* h   40 */, 49691 /* h   56 */, 211 /* h   72 */,
83 
84 /* 10**25 = */
85 42021 /* h   25 */, 2560 /* h   41 */, 51851 /* h   57 */, 1058 /* h   73 */,
86 
87 /* 10**26 = */
88 13497 /* h   26 */, 12803 /* h   42 */, 62647 /* h   58 */, 5293 /* h   74 */,
89 
90 /* 10**27 = */
91 1949 /* h   27 */, 64016 /* h   43 */, 51091 /* h   59 */, 26469 /* h   75 */,
92 
93 /* 10**28 = */
94 9745 /* h   28 */, 57936 /* h   44 */, 58851 /* h   60 */, 1276 /* h   76 */,
95 2 /* h   92 */,
96 /* 10**29 = */
97 48725 /* h   29 */, 27536 /* h   45 */, 32115 /* h   61 */, 6384 /* h   77 */,
98 10 /* h   93 */,
99 /* 10**30 = */
100 47017 /* h   30 */, 6611 /* h   46 */, 29505 /* h   62 */, 31922 /* h   78 */,
101 50 /* h   94 */,
102 /* 10**31 = */
103 38477 /* h   31 */, 33058 /* h   47 */, 16453 /* h   63 */, 28540 /* h   79 */,
104 252 /* h   95 */,
105 /* 10**32 = */
106 61313 /* h   32 */, 34220 /* h   48 */, 16731 /* h   64 */, 11629 /* h   80 */,
107 1262 /* h   96 */,
108 /* 10**33 = */
109 44421 /* h   33 */, 40032 /* h   49 */, 18121 /* h   65 */, 58146 /* h   81 */,
110 6310 /* h   97 */,
111 /* 10**34 = */
112 25497 /* h   34 */, 3555 /* h   50 */, 25072 /* h   66 */, 28587 /* h   82 */,
113 31554 /* h   98 */,
114 /* 10**35 = */
115 61949 /* h   35 */, 17776 /* h   51 */, 59824 /* h   67 */, 11864 /* h   83 */,
116 26700 /* h   99 */, 2 /* h  115 */,
117 /* 10**36 = */
118 47601 /* h   36 */, 23348 /* h   52 */, 36977 /* h   68 */, 59324 /* h   84 */,
119 2428 /* h  100 */, 12 /* h  116 */,
120 /* 10**37 = */
121 41397 /* h   37 */, 51207 /* h   53 */, 53814 /* h   69 */, 34478 /* h   85 */,
122 12144 /* h  101 */, 60 /* h  117 */,
123 /* 10**38 = */
124 10377 /* h   38 */, 59430 /* h   54 */, 6929 /* h   70 */, 41322 /* h   86 */,
125 60722 /* h  102 */, 300 /* h  118 */,
126 /* 10**39 = */
127 51885 /* h   39 */, 35006 /* h   55 */, 34649 /* h   71 */, 10002 /* h   87 */,
128 41469 /* h  103 */, 1504 /* h  119 */,
129 /* 10**40 = */
130 62817 /* h   40 */, 43961 /* h   56 */, 42175 /* h   72 */, 50012 /* h   88 */,
131 10737 /* h  104 */, 7523 /* h  120 */,
132 /* 10**41 = */
133 51941 /* h   41 */, 23201 /* h   57 */, 14270 /* h   73 */, 53455 /* h   89 */,
134 53688 /* h  105 */, 37615 /* h  121 */,
135 /* 10**42 = */
136 63097 /* h   42 */, 50472 /* h   58 */, 5815 /* h   74 */, 5132 /* h   90 */,
137 6300 /* h  106 */, 57007 /* h  122 */, 2 /* h  138 */,
138 /* 10**43 = */
139 53341 /* h   43 */, 55756 /* h   59 */, 29078 /* h   75 */, 25660 /* h   91 */,
140 31500 /* h  107 */, 22891 /* h  123 */, 14 /* h  139 */,
141 /* 10**44 = */
142 4561 /* h   44 */, 16640 /* h   60 */, 14322 /* h   76 */, 62766 /* h   92 */,
143 26429 /* h  108 */, 48921 /* h  124 */, 71 /* h  140 */,
144 /* 10**45 = */
145 22805 /* h   45 */, 17664 /* h   61 */, 6075 /* h   77 */, 51687 /* h   93 */,
146 1077 /* h  109 */, 47999 /* h  125 */, 358 /* h  141 */,
147 /* 10**46 = */
148 48489 /* h   46 */, 22785 /* h   62 */, 30376 /* h   78 */, 61827 /* h   94 */,
149 5388 /* h  110 */, 43387 /* h  126 */, 1793 /* h  142 */,
150 /* 10**47 = */
151 45837 /* h   47 */, 48392 /* h   63 */, 20809 /* h   79 */, 46993 /* h   95 */,
152 26944 /* h  111 */, 20327 /* h  127 */, 8968 /* h  143 */,
153 /* 10**48 = */
154 32577 /* h   48 */, 45355 /* h   64 */, 38512 /* h   80 */, 38358 /* h   96 */,
155 3651 /* h  112 */, 36101 /* h  128 */, 44841 /* h  144 */,
156 /* 10**49 = */
157 31813 /* h   49 */, 30169 /* h   65 */, 61491 /* h   81 */, 60720 /* h   97 */,
158 18257 /* h  113 */, 49433 /* h  129 */, 27599 /* h  145 */, 3 /* h  161 */,
159 
160 /* 10**50 = */
161 27993 /* h   50 */, 19775 /* h   66 */, 45313 /* h   82 */, 41460 /* h   98 */,
162 25753 /* h  114 */, 50558 /* h  130 */, 6926 /* h  146 */, 17 /* h  162 */,
163 
164 /* 10**51 = */
165 8893 /* h   51 */, 33341 /* h   67 */, 29958 /* h   83 */, 10695 /* h   99 */,
166 63232 /* h  115 */, 56183 /* h  131 */, 34633 /* h  147 */, 85 /* h  163 */,
167 
168 /* 10**52 = */
169 44465 /* h   52 */, 35633 /* h   68 */, 18720 /* h   84 */, 53477 /* h  100 */,
170 54016 /* h  116 */, 18775 /* h  132 */, 42097 /* h  148 */, 427 /* h  164 */,
171 
172 /* 10**53 = */
173 25717 /* h   53 */, 47096 /* h   69 */, 28066 /* h   85 */, 5242 /* h  101 */,
174 7940 /* h  117 */, 28343 /* h  133 */, 13878 /* h  149 */, 2138 /* h  165 */,
175 
176 /* 10**54 = */
177 63049 /* h   54 */, 38873 /* h   70 */, 9261 /* h   86 */, 26212 /* h  102 */,
178 39700 /* h  118 */, 10643 /* h  134 */, 3856 /* h  150 */, 10691 /* h  166 */,
179 
180 /* 10**55 = */
181 53101 /* h   55 */, 63297 /* h   71 */, 46307 /* h   87 */, 65524 /* h  103 */,
182 1893 /* h  119 */, 53218 /* h  135 */, 19280 /* h  151 */, 53455 /* h  167 */,
183 
184 /* 10**56 = */
185 3361 /* h   56 */, 54345 /* h   72 */, 34931 /* h   88 */, 65479 /* h  104 */,
186 9469 /* h  120 */, 3946 /* h  136 */, 30868 /* h  152 */, 5132 /* h  168 */,
187 4 /* h  184 */,
188 /* 10**57 = */
189 16805 /* h   57 */, 9581 /* h   73 */, 43587 /* h   89 */, 65253 /* h  105 */,
190 47349 /* h  121 */, 19730 /* h  137 */, 23268 /* h  153 */, 25662 /* h  169 */,
191 20 /* h  185 */,
192 /* 10**58 = */
193 18489 /* h   58 */, 47906 /* h   74 */, 21327 /* h   90 */, 64124 /* h  106 */,
194 40141 /* h  122 */, 33117 /* h  138 */, 50805 /* h  154 */, 62775 /* h  170 */,
195 101 /* h  186 */,
196 /* 10**59 = */
197 26909 /* h   59 */, 42923 /* h   75 */, 41102 /* h   91 */, 58477 /* h  107 */,
198 4101 /* h  123 */, 34516 /* h  139 */, 57419 /* h  155 */, 51734 /* h  171 */,
199 509 /* h  187 */,
200 /* 10**60 = */
201 3473 /* h   60 */, 18009 /* h   76 */, 8905 /* h   92 */, 30244 /* h  108 */,
202 20509 /* h  124 */, 41508 /* h  140 */, 24953 /* h  156 */, 62066 /* h  172 */,
203 2548 /* h  188 */,
204 /* 10**61 = */
205 17365 /* h   61 */, 24509 /* h   77 */, 44526 /* h   93 */, 20148 /* h  109 */,
206 37011 /* h  125 */, 10933 /* h  141 */, 59232 /* h  157 */, 48187 /* h  173 */,
207 12744 /* h  189 */,
208 /* 10**62 = */
209 21289 /* h   62 */, 57010 /* h   78 */, 26023 /* h   94 */, 35207 /* h  110 */,
210 53984 /* h  126 */, 54667 /* h  142 */, 34016 /* h  158 */, 44331 /* h  174 */,
211 63723 /* h  190 */,
212 /* 10**63 = */
213 40909 /* h   63 */, 22907 /* h   79 */, 64583 /* h   95 */, 44964 /* h  111 */,
214 7778 /* h  127 */, 11195 /* h  143 */, 39012 /* h  159 */, 25049 /* h  175 */,
215 56474 /* h  191 */, 4 /* h  207 */,
216 0};
217 
218 /* table of starting indexes into previous table */
219 const unsigned short __tbl_10_small_start [] = {
220 0, 1, 2, 3, 4, 5, 6, 7,
221 9, 11, 13, 15, 17, 19, 21, 24,
222 27, 30, 33, 36, 39, 42, 46, 50,
223 54, 58, 62, 66, 70, 75, 80, 85,
224 90, 95, 100, 105, 111, 117, 123, 129,
225 135, 141, 147, 154, 161, 168, 175, 182,
226 189, 196, 204, 212, 220, 228, 236, 244,
227 252, 261, 270, 279, 288, 297, 306, 315,
228 325, 0};
229