comments
[btb/d2x.git] / maths / tables.c
1 /* $Id: tables.c,v 1.3 2003-02-18 20:23:22 btb Exp $ */
2 /*
3 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
4 SOFTWARE CORPORATION ("PARALLAX").  PARALLAX, IN DISTRIBUTING THE CODE TO
5 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
6 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
7 IN USING, DISPLAYING,  AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
8 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
9 FREE PURPOSES.  IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
10 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES.  THE END-USER UNDERSTANDS
11 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
12 COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION.  ALL RIGHTS RESERVED.
13 */
14
15 /*
16  *
17  * C version of fixed point library
18  *
19  * Old Log:
20  * Revision 1.2  1995/08/31  15:44:36  allender
21  * ..
22  *
23  * Revision 1.1  1995/04/17  11:38:04  allender
24  * Initial revision
25  *
26 */
27
28 #ifdef HAVE_CONFIG_H
29 #include <conf.h>
30 #endif
31
32 #include "maths.h"
33
34 ubyte guess_table[] = {
35         1,                              
36         1,1,1,          
37         2,2,2,2,2,      
38         3,3,3,3,3,3,3,  
39         4,4,4,4,4,4,4,4,4,      
40         5,5,5,5,5,5,5,5,5,5,5,  
41         6,6,6,6,6,6,6,6,6,6,6,6,6,      
42         7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,  
43         8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,      
44         9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,  
45         10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, 
46         11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,   
47         12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,             
48         13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,                       
49         14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, 
50         15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15
51 };
52
53 short sincos_table[] = {
54         0,
55         402,
56         804,
57         1205,
58         1606,
59         2006,
60         2404,
61         2801,
62         3196,
63         3590,
64         3981,
65         4370,
66         4756,
67         5139,
68         5520,
69         5897,
70         6270,
71         6639,
72         7005,
73         7366,
74         7723,
75         8076,
76         8423,
77         8765,
78         9102,
79         9434,
80         9760,
81         10080,
82         10394,
83         10702,
84         11003,
85         11297,
86         11585,
87         11866,
88         12140,
89         12406,
90         12665,
91         12916,
92         13160,
93         13395,
94         13623,
95         13842,
96         14053,
97         14256,
98         14449,
99         14635,
100         14811,
101         14978,
102         15137,
103         15286,
104         15426,
105         15557,
106         15679,
107         15791,
108         15893,
109         15986,
110         16069,
111         16143,
112         16207,
113         16261,
114         16305,
115         16340,
116         16364,
117         16379,
118 //cos_table
119         16384,
120         16379,
121         16364,
122         16340,
123         16305,
124         16261,
125         16207,
126         16143,
127         16069,
128         15986,
129         15893,
130         15791,
131         15679,
132         15557,
133         15426,
134         15286,
135         15137,
136         14978,
137         14811,
138         14635,
139         14449,
140         14256,
141         14053,
142         13842,
143         13623,
144         13395,
145         13160,
146         12916,
147         12665,
148         12406,
149         12140,
150         11866,
151         11585,
152         11297,
153         11003,
154         10702,
155         10394,
156         10080,
157         9760,
158         9434,
159         9102,
160         8765,
161         8423,
162         8076,
163         7723,
164         7366,
165         7005,
166         6639,
167         6270,
168         5897,
169         5520,
170         5139,
171         4756,
172         4370,
173         3981,
174         3590,
175         3196,
176         2801,
177         2404,
178         2006,
179         1606,
180         1205,
181         804,
182         402,
183         0,
184         -402,
185         -804,
186         -1205,
187         -1606,
188         -2006,
189         -2404,
190         -2801,
191         -3196,
192         -3590,
193         -3981,
194         -4370,
195         -4756,
196         -5139,
197         -5520,
198         -5897,
199         -6270,
200         -6639,
201         -7005,
202         -7366,
203         -7723,
204         -8076,
205         -8423,
206         -8765,
207         -9102,
208         -9434,
209         -9760,
210         -10080,
211         -10394,
212         -10702,
213         -11003,
214         -11297,
215         -11585,
216         -11866,
217         -12140,
218         -12406,
219         -12665,
220         -12916,
221         -13160,
222         -13395,
223         -13623,
224         -13842,
225         -14053,
226         -14256,
227         -14449,
228         -14635,
229         -14811,
230         -14978,
231         -15137,
232         -15286,
233         -15426,
234         -15557,
235         -15679,
236         -15791,
237         -15893,
238         -15986,
239         -16069,
240         -16143,
241         -16207,
242         -16261,
243         -16305,
244         -16340,
245         -16364,
246         -16379,
247         -16384,
248         -16379,
249         -16364,
250         -16340,
251         -16305,
252         -16261,
253         -16207,
254         -16143,
255         -16069,
256         -15986,
257         -15893,
258         -15791,
259         -15679,
260         -15557,
261         -15426,
262         -15286,
263         -15137,
264         -14978,
265         -14811,
266         -14635,
267         -14449,
268         -14256,
269         -14053,
270         -13842,
271         -13623,
272         -13395,
273         -13160,
274         -12916,
275         -12665,
276         -12406,
277         -12140,
278         -11866,
279         -11585,
280         -11297,
281         -11003,
282         -10702,
283         -10394,
284         -10080,
285         -9760,
286         -9434,
287         -9102,
288         -8765,
289         -8423,
290         -8076,
291         -7723,
292         -7366,
293         -7005,
294         -6639,
295         -6270,
296         -5897,
297         -5520,
298         -5139,
299         -4756,
300         -4370,
301         -3981,
302         -3590,
303         -3196,
304         -2801,
305         -2404,
306         -2006,
307         -1606,
308         -1205,
309         -804,
310         -402,
311         0,
312         402,
313         804,
314         1205,
315         1606,
316         2006,
317         2404,
318         2801,
319         3196,
320         3590,
321         3981,
322         4370,
323         4756,
324         5139,
325         5520,
326         5897,
327         6270,
328         6639,
329         7005,
330         7366,
331         7723,
332         8076,
333         8423,
334         8765,
335         9102,
336         9434,
337         9760,
338         10080,
339         10394,
340         10702,
341         11003,
342         11297,
343         11585,
344         11866,
345         12140,
346         12406,
347         12665,
348         12916,
349         13160,
350         13395,
351         13623,
352         13842,
353         14053,
354         14256,
355         14449,
356         14635,
357         14811,
358         14978,
359         15137,
360         15286,
361         15426,
362         15557,
363         15679,
364         15791,
365         15893,
366         15986,
367         16069,
368         16143,
369         16207,
370         16261,
371         16305,
372         16340,
373         16364,
374         16379,
375         16384
376 };
377
378 ushort asin_table[] = {
379         0,
380         41,
381         81,
382         122,
383         163,
384         204,
385         244,
386         285,
387         326,
388         367,
389         408,
390         448,
391         489,
392         530,
393         571,
394         612,
395         652,
396         693,
397         734,
398         775,
399         816,
400         857,
401         897,
402         938,
403         979,
404         1020,
405         1061,
406         1102,
407         1143,
408         1184,
409         1225,
410         1266,
411         1307,
412         1348,
413         1389,
414         1431,
415         1472,
416         1513,
417         1554,
418         1595,
419         1636,
420         1678,
421         1719,
422         1760,
423         1802,
424         1843,
425         1884,
426         1926,
427         1967,
428         2009,
429         2050,
430         2092,
431         2134,
432         2175,
433         2217,
434         2259,
435         2300,
436         2342,
437         2384,
438         2426,
439         2468,
440         2510,
441         2551,
442         2593,
443         2636,
444         2678,
445         2720,
446         2762,
447         2804,
448         2847,
449         2889,
450         2931,
451         2974,
452         3016,
453         3059,
454         3101,
455         3144,
456         3187,
457         3229,
458         3272,
459         3315,
460         3358,
461         3401,
462         3444,
463         3487,
464         3530,
465         3573,
466         3617,
467         3660,
468         3704,
469         3747,
470         3791,
471         3834,
472         3878,
473         3922,
474         3965,
475         4009,
476         4053,
477         4097,
478         4142,
479         4186,
480         4230,
481         4275,
482         4319,
483         4364,
484         4408,
485         4453,
486         4498,
487         4543,
488         4588,
489         4633,
490         4678,
491         4723,
492         4768,
493         4814,
494         4859,
495         4905,
496         4951,
497         4997,
498         5043,
499         5089,
500         5135,
501         5181,
502         5228,
503         5274,
504         5321,
505         5367,
506         5414,
507         5461,
508         5508,
509         5556,
510         5603,
511         5651,
512         5698,
513         5746,
514         5794,
515         5842,
516         5890,
517         5938,
518         5987,
519         6035,
520         6084,
521         6133,
522         6182,
523         6231,
524         6281,
525         6330,
526         6380,
527         6430,
528         6480,
529         6530,
530         6580,
531         6631,
532         6681,
533         6732,
534         6783,
535         6835,
536         6886,
537         6938,
538         6990,
539         7042,
540         7094,
541         7147,
542         7199,
543         7252,
544         7306,
545         7359,
546         7413,
547         7466,
548         7521,
549         7575,
550         7630,
551         7684,
552         7740,
553         7795,
554         7851,
555         7907,
556         7963,
557         8019,
558         8076,
559         8133,
560         8191,
561         8249,
562         8307,
563         8365,
564         8424,
565         8483,
566         8543,
567         8602,
568         8663,
569         8723,
570         8784,
571         8846,
572         8907,
573         8970,
574         9032,
575         9095,
576         9159,
577         9223,
578         9288,
579         9353,
580         9418,
581         9484,
582         9551,
583         9618,
584         9686,
585         9754,
586         9823,
587         9892,
588         9963,
589         10034,
590         10105,
591         10177,
592         10251,
593         10324,
594         10399,
595         10475,
596         10551,
597         10628,
598         10706,
599         10785,
600         10866,
601         10947,
602         11029,
603         11113,
604         11198,
605         11284,
606         11371,
607         11460,
608         11550,
609         11642,
610         11736,
611         11831,
612         11929,
613         12028,
614         12130,
615         12234,
616         12340,
617         12449,
618         12561,
619         12677,
620         12796,
621         12919,
622         13046,
623         13178,
624         13315,
625         13459,
626         13610,
627         13770,
628         13939,
629         14121,
630         14319,
631         14538,
632         14786,
633         15079,
634         15462,
635         16384,
636         16384                   //extra for when exacty 1
637 };
638
639 ushort acos_table[] = {
640         16384,
641         16343,
642         16303,
643         16262,
644         16221,
645         16180,
646         16140,
647         16099,
648         16058,
649         16017,
650         15976,
651         15936,
652         15895,
653         15854,
654         15813,
655         15772,
656         15732,
657         15691,
658         15650,
659         15609,
660         15568,
661         15527,
662         15487,
663         15446,
664         15405,
665         15364,
666         15323,
667         15282,
668         15241,
669         15200,
670         15159,
671         15118,
672         15077,
673         15036,
674         14995,
675         14953,
676         14912,
677         14871,
678         14830,
679         14789,
680         14748,
681         14706,
682         14665,
683         14624,
684         14582,
685         14541,
686         14500,
687         14458,
688         14417,
689         14375,
690         14334,
691         14292,
692         14250,
693         14209,
694         14167,
695         14125,
696         14084,
697         14042,
698         14000,
699         13958,
700         13916,
701         13874,
702         13833,
703         13791,
704         13748,
705         13706,
706         13664,
707         13622,
708         13580,
709         13537,
710         13495,
711         13453,
712         13410,
713         13368,
714         13325,
715         13283,
716         13240,
717         13197,
718         13155,
719         13112,
720         13069,
721         13026,
722         12983,
723         12940,
724         12897,
725         12854,
726         12811,
727         12767,
728         12724,
729         12680,
730         12637,
731         12593,
732         12550,
733         12506,
734         12462,
735         12419,
736         12375,
737         12331,
738         12287,
739         12242,
740         12198,
741         12154,
742         12109,
743         12065,
744         12020,
745         11976,
746         11931,
747         11886,
748         11841,
749         11796,
750         11751,
751         11706,
752         11661,
753         11616,
754         11570,
755         11525,
756         11479,
757         11433,
758         11387,
759         11341,
760         11295,
761         11249,
762         11203,
763         11156,
764         11110,
765         11063,
766         11017,
767         10970,
768         10923,
769         10876,
770         10828,
771         10781,
772         10733,
773         10686,
774         10638,
775         10590,
776         10542,
777         10494,
778         10446,
779         10397,
780         10349,
781         10300,
782         10251,
783         10202,
784         10153,
785         10103,
786         10054,
787         10004,
788         9954,
789         9904,
790         9854,
791         9804,
792         9753,
793         9703,
794         9652,
795         9601,
796         9549,
797         9498,
798         9446,
799         9394,
800         9342,
801         9290,
802         9237,
803         9185,
804         9132,
805         9078,
806         9025,
807         8971,
808         8918,
809         8863,
810         8809,
811         8754,
812         8700,
813         8644,
814         8589,
815         8533,
816         8477,
817         8421,
818         8365,
819         8308,
820         8251,
821         8193,
822         8135,
823         8077,
824         8019,
825         7960,
826         7901,
827         7841,
828         7782,
829         7721,
830         7661,
831         7600,
832         7538,
833         7477,
834         7414,
835         7352,
836         7289,
837         7225,
838         7161,
839         7096,
840         7031,
841         6966,
842         6900,
843         6833,
844         6766,
845         6698,
846         6630,
847         6561,
848         6492,
849         6421,
850         6350,
851         6279,
852         6207,
853         6133,
854         6060,
855         5985,
856         5909,
857         5833,
858         5756,
859         5678,
860         5599,
861         5518,
862         5437,
863         5355,
864         5271,
865         5186,
866         5100,
867         5013,
868         4924,
869         4834,
870         4742,
871         4648,
872         4553,
873         4455,
874         4356,
875         4254,
876         4150,
877         4044,
878         3935,
879         3823,
880         3707,
881         3588,
882         3465,
883         3338,
884         3206,
885         3069,
886         2925,
887         2774,
888         2614,
889         2445,
890         2263,
891         2065,
892         1846,
893         1598,
894         1305,
895         922,
896         0,
897         0       //extra for when exacty 1
898 };
899
900 fix isqrt_guess_table[] = {
901 //      0,
902         0x80000000,
903         16777216,11863283,9686330,8388608,7502999,6849269,6341191,
904         5931641,5592405,5305421,5058520,4843165,4653162,4483899,4331858,
905         4194304,4069072,3954427,3848957,3751499,3661088,3576914,3498291,
906         3424634,3355443,3290282,3228776,3170595,3115450,3063086,3013276,
907         2965820,2920538,2877268,2835867,2796202,2758157,2721623,2686504,
908         2652710,2620160,2588780,2558501,2529260,2500999,2473665,2447208,
909         2421582,2396745,2372656,2349280,2326581,2304527,2283089,2262239,
910         2241949,2222196,2202956,2184207,2165929,2148102,2130708,2113730,
911         2097152,2080957,2065132,2049663,2034536,2019739,2005260,1991089,
912         1977213,1963624,1950311,1937266,1924478,1911941,1899645,1887584,
913         1875749,1864135,1852733,1841538,1830544,1819744,1809133,1798706,
914         1788457,1778381,1768473,1758730,1749145,1739716,1730437,1721306,
915         1712317,1703468,1694754,1686173,1677721,1669395,1661191,1653108,
916         1645141,1637288,1629547,1621914,1614388,1606965,1599644,1592422,
917         1585297,1578267,1571330,1564483,1557725,1551054,1544467,1537964,
918         1531543,1525201,1518937,1512750,1506638,1500599,1494633,1488737,
919         1482910,1477151,1471459,1465832,1460269,1454769,1449330,1443952,
920         1438634,1433374,1428171,1423024,1417933,1412896,1407912,1402981,
921         1398101,1393271,1388492,1383761,1379078,1374443,1369853,1365310,
922         1360811,1356357,1351946,1347578,1343252,1338967,1334723,1330519,
923         1326355,1322229,1318142,1314092,1310080,1306104,1302164,1298259,
924         1294390,1290555,1286753,1282985,1279250,1275548,1271877,1268238,
925         1264630,1261052,1257505,1253987,1250499,1247040,1243609,1240207,
926         1236832,1233485,1230165,1226871,1223604,1220362,1217147,1213956,
927         1210791,1207650,1204533,1201441,1198372,1195327,1192304,1189305,
928         1186328,1183373,1180440,1177529,1174640,1171771,1168924,1166097,
929         1163290,1160504,1157737,1154991,1152263,1149555,1146866,1144196,
930         1141544,1138911,1136296,1133699,1131119,1128557,1126013,1123485,
931         1120974,1118481,1116003,1113542,1111098,1108669,1106256,1103859,
932         1101478,1099111,1096760,1094424,1092103,1089797,1087505,1085227,
933         1082964,1080715,1078480,1076258,1074051,1071857,1069676,1067508,
934         1065354,1063212,1061084,1058968,1056865,1054774,1052696,1050630,
935         1048576,1046533,1044503,1042485,1040478,1038483,1036499,1034527,
936         1032566,1030616,1028677,1026748,1024831,1022924,1021028,1019143,
937         1017268,1015403,1013548,1011704,1009869,1008045,1006230,1004425,
938         1002630,1000844,999068,997301,995544,993796,992057,990327,
939         988606,986895,985192,983497,981812,980135,978467,976807,
940         975155,973512,971878,970251,968633,967022,965420,963825,
941         962239,960660,959089,957526,955970,954422,952881,951348,
942         949822,948304,946793,945289,943792,942302,940819,939343,
943         937874,936412,934957,933509,932067,930632,929204,927782,
944         926366,924957,923555,922159,920769,919385,918008,916637,
945         915272,913913,912560,911213,909872,908537,907207,905884,
946         904566,903254,901948,900648,899353,898063,896779,895501,
947         894228,892961,891698,890442,889190,887944,886703,885467,
948         884236,883011,881790,880575,879365,878159,876959,875763,
949         874572,873386,872205,871029,869858,868691,867529,866371,
950         865218,864070,862926,861787,860653,859522,858397,857275,
951         856158,855046,853937,852833,851734,850638,849547,848460,
952         847377,846298,845223,844153,843086,842024,840965,839911,
953         838860,837814,836771,835732,834697,833666,832639,831615,
954         830595,829579,828567,827559,826554,825552,824555,823561,
955         822570,821583,820600,819620,818644,817671,816702,815736,
956         814773,813814,812858,811906,810957,810011,809069,808130,
957         807194,806261,805332,804405,803482,802563,801646,800732,
958         799822,798915,798010,797109,796211,795316,794424,793535,
959         792648,791765,790885,790008,789133,788262,787393,786528,
960         785665,784805,783947,783093,782241,781392,780546,779703,
961         778862,778024,777189,776356,775527,774699,773875,773053,
962         772233,771417,770603,769791,768982,768175,767371,766570,
963         765771,764975,764181,763389,762600,761814,761029,760248,
964         759468,758691,757917,757145,756375,755607,754842,754079,
965         753319,752560,751805,751051,750299,749550,748803,748059,
966         747316,746576,745838,745102,744368,743637,742907,742180,
967         741455,740732,740011,739292,738575,737861,737148,736438,
968         735729,735023,734318,733616,732916,732217,731521,730827,
969         730134,729444,728755,728069,727384,726701,726021,725342,
970         724665,723990,723317,722645,721976,721308,720643,719979,
971         719317,718656,717998,717341,716687,716034,715382,714733,
972         714085,713439,712795,712153,711512,710873,710236,709600,
973         708966,708334,707704,707075,706448,705822,705198,704576,
974         703956,703337,702720,702104,701490,700878,700267,699658,
975         699050,698444,697840,697237,696635,696036,695437,694841,
976         694246,693652,693060,692469,691880,691293,690707,690122,
977         689539,688957,688377,687798,687221,686645,686071,685498,
978         684926,684356,683788,683221,682655,682090,681527,680966,
979         680405,679847,679289,678733,678178,677625,677073,676522,
980         675973,675425,674878,674333,673789,673246,672705,672164,
981         671626,671088,670552,670017,669483,668951,668420,667890,
982         667361,666834,666308,665783,665259,664737,664216,663696,
983         663177,662660,662143,661628,661114,660602,660090,659580,
984         659071,658563,658056,657550,657046,656543,656041,655540,
985         655040,654541,654043,653547,653052,652558,652065,651573,
986         651082,650592,650103,649616,649129,648644,648160,647677,
987         647195,646714,646234,645755,645277,644800,644325,643850,
988         643376,642904,642432,641962,641492,641024,640557,640090,
989         639625,639161,638697,638235,637774,637313,636854,636396,
990         635938,635482,635026,634572,634119,633666,633215,632764,
991         632315,631866,631418,630972,630526,630081,629637,629194,
992         628752,628311,627871,627432,626993,626556,626120,625684,
993         625249,624816,624383,623951,623520,623090,622660,622232,
994         621804,621378,620952,620527,620103,619680,619258,618836,
995         618416,617996,617577,617159,616742,616326,615910,615496,
996         615082,614669,614257,613846,613435,613026,612617,612209,
997         611802,611395,610990,610585,610181,609778,609375,608974,
998         608573,608173,607774,607375,606978,606581,606185,605790,
999         605395,605001,604608,604216,603825,603434,603044,602655,
1000         602266,601879,601492,601106,600720,600335,599952,599568,
1001         599186,598804,598423,598043,597663,597284,596906,596529,
1002         596152,595776,595401,595026,594652,594279,593907,593535,
1003         593164,592793,592424,592055,591686,591319,590952,590585,
1004         590220,589855,589491,589127,588764,588402,588041,587680,
1005         587320,586960,586601,586243,585885,585528,585172,584816,
1006         584462,584107,583754,583400,583048,582696,582345,581995,
1007         581645,581296,580947,580599,580252,579905,579559,579213,
1008         578868,578524,578181,577838,577495,577153,576812,576471,
1009         576131,575792,575453,575115,574777,574440,574104,573768,
1010         573433,573098,572764,572431,572098,571765,571434,571103,
1011         570772,570442,570113,569784,569455,569128,568800,568474,
1012         568148,567822,567497,567173,566849,566526,566203,565881,
1013         565559,565238,564918,564598,564278,563959,563641,563323,
1014         563006,562689,562373,562057,561742,561428,561114,560800,
1015         560487,560174,559862,559551,559240,558930,558620,558310,
1016         558001,557693,557385,557078,556771,556465,556159,555853,
1017         555549,555244,554940,554637,554334,554032,553730,553429,
1018         553128,552828,552528,552228,551929,551631,551333,551036,
1019         550739,550442,550146,549851,549555,549261,548967,548673,
1020         548380,548087,547795,547503,547212,546921,546631,546341,
1021         546051,545762,545474,545186,544898,544611,544324,544038,
1022         543752,543467,543182,542897,542613,542330,542047,541764,
1023         541482,541200,540919,540638,540357,540077,539798,539518,
1024         539240,538961,538683,538406,538129,537852,537576,537300,
1025         537025,536750,536476,536202,535928,535655,535382,535110,
1026         534838,534566,534295,534024,533754,533484,533214,532945,
1027         532677,532408,532140,531873,531606,531339,531073,530807,
1028         530542,530277,530012,529748,529484,529220,528957,528694,
1029         528432,528170,527909,527648,527387,527126,526866,526607,
1030         526348,526089,525830,525572,525315,525057,524800,524544
1031 };
1032