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