Mercurial > hg > CbC > CbC_gcc
comparison libdecnumber/decDPD.h @ 55:77e2b8dfacca gcc-4.4.5
update it from 4.4.3 to 4.5.0
author | ryoma <e075725@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 12 Feb 2010 23:39:51 +0900 |
parents | a06113de4d67 |
children | 04ced10e8804 |
comparison
equal
deleted
inserted
replaced
52:c156f1bd5cd9 | 55:77e2b8dfacca |
---|---|
23 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | 23 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see |
24 <http://www.gnu.org/licenses/>. */ | 24 <http://www.gnu.org/licenses/>. */ |
25 | 25 |
26 /* ------------------------------------------------------------------------ */ | 26 /* ------------------------------------------------------------------------ */ |
27 /* Binary Coded Decimal and Densely Packed Decimal conversion lookup tables */ | 27 /* Binary Coded Decimal and Densely Packed Decimal conversion lookup tables */ |
28 /* [Automatically generated -- do not edit. 2007.05.05] */ | 28 /* [Automatically generated -- do not edit. 2008.06.21] */ |
29 /* ------------------------------------------------------------------------ */ | 29 /* ------------------------------------------------------------------------ */ |
30 /* ------------------------------------------------------------------------ */ | 30 /* For details, see DPDecimal.html on the General Decimal Arithmetic page. */ |
31 /* For details, see: http://www2.hursley.ibm.com/decimal/DPDecimal.html */ | |
32 | 31 |
33 #include "decDPDSymbols.h" | 32 #include "decDPDSymbols.h" |
34 | 33 |
35 /* This include file defines several DPD and BCD conversion tables: */ | 34 /* This include file defines several DPD and BCD conversion tables: */ |
36 /* */ | 35 /* */ |
37 /* uint16_t BCD2DPD[2458]; -- BCD -> DPD (0x999 => 2457) */ | 36 /* uint16_t BCD2DPD[2458]; -- BCD -> DPD (0x999 => 2457) */ |
38 /* uint16_t BIN2DPD[1000]; -- Bin -> DPD (999 => 2457) */ | 37 /* uint16_t BIN2DPD[1000]; -- Bin -> DPD (999 => 2457) */ |
39 /* uint8_t BIN2CHAR[4001]; -- Bin -> CHAR (999 => '\3' '9' '9' '9') */ | 38 /* uint8_t BIN2CHAR[4001]; -- Bin -> CHAR (999 => '\3' '9' '9' '9') */ |
40 /* uint8_t BIN2BCD8[4000]; -- Bin -> bytes (999 => 9 9 9 3) */ | 39 /* uint8_t BIN2BCD8[4000]; -- Bin -> bytes (999 => 9 9 9 3) */ |
41 /* uint16_t DPD2BCD[1024]; -- DPD -> BCD (0x3FF => 0x999) */ | 40 /* uint16_t DPD2BCD[1024]; -- DPD -> BCD (0x3FF => 0x999) */ |
42 /* uint16_t DPD2BIN[1024]; -- DPD -> BIN (0x3FF => 999) */ | 41 /* uint16_t DPD2BIN[1024]; -- DPD -> BIN (0x3FF => 999) */ |
43 /* uint32_t DPD2BINK[1024]; -- DPD -> BIN * 1000 (0x3FF => 999000) */ | 42 /* uint32_t DPD2BINK[1024]; -- DPD -> BIN * 1000 (0x3FF => 999000) */ |
44 /* uint32_t DPD2BINM[1024]; -- DPD -> BIN * 1E+6 (0x3FF => 999000000) */ | 43 /* uint32_t DPD2BINM[1024]; -- DPD -> BIN * 1E+6 (0x3FF => 999000000) */ |
45 /* uint8_t DPD2BCD8[4096]; -- DPD -> bytes (x3FF => 9 9 9 3) */ | 44 /* uint8_t DPD2BCD8[4096]; -- DPD -> bytes (x3FF => 9 9 9 3) */ |
46 /* */ | 45 /* */ |
47 /* In all cases the result (10 bits or 12 bits, or binary) is right-aligned */ | 46 /* In all cases the result (10 bits or 12 bits, or binary) is right-aligned */ |
48 /* in the table entry. BIN2CHAR entries are a single byte length (0 for */ | 47 /* in the table entry. BIN2CHAR entries are a single byte length (0 for */ |
49 /* value 0) followed by three digit characters; a trailing terminator is */ | 48 /* value 0) followed by three digit characters; a trailing terminator is */ |
50 /* included to allow 4-char moves always. BIN2BCD8 and DPD2BCD8 entries */ | 49 /* included to allow 4-char moves always. BIN2BCD8 and DPD2BCD8 entries */ |
51 /* are similar with the three BCD8 digits followed by a one-byte length */ | 50 /* are similar with the three BCD8 digits followed by a one-byte length */ |
52 /* (again, length=0 for value 0). */ | 51 /* (again, length=0 for value 0). */ |
53 /* */ | 52 /* */ |
54 /* To use a table, its name, prefixed with DEC_, must be defined with a */ | 53 /* To use a table, its name, prefixed with DEC_, must be defined with a */ |
55 /* value of 1 before this header file is included. For example: */ | 54 /* value of 1 before this header file is included. For example: */ |
56 /* #define DEC_BCD2DPD 1 */ | 55 /* #define DEC_BCD2DPD 1 */ |
57 /* This mechanism allows software to only include tables that are needed. */ | 56 /* This mechanism allows software to only include tables that are needed. */ |
58 /* ------------------------------------------------------------------------ */ | 57 /* ------------------------------------------------------------------------ */ |
59 | 58 |
60 #if defined(DEC_BCD2DPD) && DEC_BCD2DPD==1 && !defined(DECBCD2DPD) | 59 #if defined(DEC_BCD2DPD) && DEC_BCD2DPD==1 && !defined(DECBCD2DPD) |
61 #define DECBCD2DPD | 60 #define DECBCD2DPD |
61 | |
62 #ifdef __cplusplus | |
63 extern "C" { | |
64 #endif | |
62 | 65 |
63 const uint16_t BCD2DPD[2458]={ 0, 1, 2, 3, 4, 5, 6, 7, | 66 const uint16_t BCD2DPD[2458]={ 0, 1, 2, 3, 4, 5, 6, 7, |
64 8, 9, 0, 0, 0, 0, 0, 0, 16, 17, 18, 19, 20, | 67 8, 9, 0, 0, 0, 0, 0, 0, 16, 17, 18, 19, 20, |
65 21, 22, 23, 24, 25, 0, 0, 0, 0, 0, 0, 32, 33, | 68 21, 22, 23, 24, 25, 0, 0, 0, 0, 0, 0, 32, 33, |
66 34, 35, 36, 37, 38, 39, 40, 41, 0, 0, 0, 0, 0, | 69 34, 35, 36, 37, 38, 39, 40, 41, 0, 0, 0, 0, 0, |
506 #endif | 509 #endif |
507 | 510 |
508 #if defined(DEC_DPD2BINK) && DEC_DPD2BINK==1 && !defined(DECDPD2BINK) | 511 #if defined(DEC_DPD2BINK) && DEC_DPD2BINK==1 && !defined(DECDPD2BINK) |
509 #define DECDPD2BINK | 512 #define DECDPD2BINK |
510 | 513 |
511 const uint32_t DPD2BINK[1024]={ 0, 1000, 2000, 3000, 4000, 5000, | 514 const uint32_t DPD2BINK[1024]={ 0, 1000, 2000, 3000, 4000, 5000, |
512 6000, 7000, 8000, 9000, 80000, 81000, 800000, 801000, 880000, 881000, | 515 6000, 7000, 8000, 9000, 80000, 81000, 800000, 801000, 880000, 881000, |
513 10000, 11000, 12000, 13000, 14000, 15000, 16000, 17000, 18000, 19000, | 516 10000, 11000, 12000, 13000, 14000, 15000, 16000, 17000, 18000, 19000, |
514 90000, 91000, 810000, 811000, 890000, 891000, 20000, 21000, 22000, 23000, | 517 90000, 91000, 810000, 811000, 890000, 891000, 20000, 21000, 22000, 23000, |
515 24000, 25000, 26000, 27000, 28000, 29000, 82000, 83000, 820000, 821000, | 518 24000, 25000, 26000, 27000, 28000, 29000, 82000, 83000, 820000, 821000, |
516 808000, 809000, 30000, 31000, 32000, 33000, 34000, 35000, 36000, 37000, | 519 808000, 809000, 30000, 31000, 32000, 33000, 34000, 35000, 36000, 37000, |
614 #endif | 617 #endif |
615 | 618 |
616 #if defined(DEC_DPD2BINM) && DEC_DPD2BINM==1 && !defined(DECDPD2BINM) | 619 #if defined(DEC_DPD2BINM) && DEC_DPD2BINM==1 && !defined(DECDPD2BINM) |
617 #define DECDPD2BINM | 620 #define DECDPD2BINM |
618 | 621 |
619 const uint32_t DPD2BINM[1024]={0, 1000000, 2000000, 3000000, 4000000, | 622 const uint32_t DPD2BINM[1024]={0, 1000000, 2000000, 3000000, 4000000, |
620 5000000, 6000000, 7000000, 8000000, 9000000, 80000000, 81000000, | 623 5000000, 6000000, 7000000, 8000000, 9000000, 80000000, 81000000, |
621 800000000, 801000000, 880000000, 881000000, 10000000, 11000000, 12000000, | 624 800000000, 801000000, 880000000, 881000000, 10000000, 11000000, 12000000, |
622 13000000, 14000000, 15000000, 16000000, 17000000, 18000000, 19000000, | 625 13000000, 14000000, 15000000, 16000000, 17000000, 18000000, 19000000, |
623 90000000, 91000000, 810000000, 811000000, 890000000, 891000000, 20000000, | 626 90000000, 91000000, 810000000, 811000000, 890000000, 891000000, 20000000, |
624 21000000, 22000000, 23000000, 24000000, 25000000, 26000000, 27000000, | 627 21000000, 22000000, 23000000, 24000000, 25000000, 26000000, 27000000, |
625 28000000, 29000000, 82000000, 83000000, 820000000, 821000000, 808000000, | 628 28000000, 29000000, 82000000, 83000000, 820000000, 821000000, 808000000, |
626 809000000, 30000000, 31000000, 32000000, 33000000, 34000000, 35000000, | 629 809000000, 30000000, 31000000, 32000000, 33000000, 34000000, 35000000, |
627 36000000, 37000000, 38000000, 39000000, 92000000, 93000000, 830000000, | 630 36000000, 37000000, 38000000, 39000000, 92000000, 93000000, 830000000, |
628 831000000, 818000000, 819000000, 40000000, 41000000, 42000000, 43000000, | 631 831000000, 818000000, 819000000, 40000000, 41000000, 42000000, 43000000, |
629 44000000, 45000000, 46000000, 47000000, 48000000, 49000000, 84000000, | 632 44000000, 45000000, 46000000, 47000000, 48000000, 49000000, 84000000, |
630 85000000, 840000000, 841000000, 88000000, 89000000, 50000000, 51000000, | 633 85000000, 840000000, 841000000, 88000000, 89000000, 50000000, 51000000, |
631 52000000, 53000000, 54000000, 55000000, 56000000, 57000000, 58000000, | 634 52000000, 53000000, 54000000, 55000000, 56000000, 57000000, 58000000, |
632 59000000, 94000000, 95000000, 850000000, 851000000, 98000000, 99000000, | 635 59000000, 94000000, 95000000, 850000000, 851000000, 98000000, 99000000, |
633 60000000, 61000000, 62000000, 63000000, 64000000, 65000000, 66000000, | 636 60000000, 61000000, 62000000, 63000000, 64000000, 65000000, 66000000, |
634 67000000, 68000000, 69000000, 86000000, 87000000, 860000000, 861000000, | 637 67000000, 68000000, 69000000, 86000000, 87000000, 860000000, 861000000, |
635 888000000, 889000000, 70000000, 71000000, 72000000, 73000000, 74000000, | 638 888000000, 889000000, 70000000, 71000000, 72000000, 73000000, 74000000, |
636 75000000, 76000000, 77000000, 78000000, 79000000, 96000000, 97000000, | 639 75000000, 76000000, 77000000, 78000000, 79000000, 96000000, 97000000, |
637 870000000, 871000000, 898000000, 899000000, 100000000, 101000000, 102000000, | 640 870000000, 871000000, 898000000, 899000000, 100000000, 101000000, 102000000, |
638 103000000, 104000000, 105000000, 106000000, 107000000, 108000000, 109000000, | 641 103000000, 104000000, 105000000, 106000000, 107000000, 108000000, 109000000, |
639 180000000, 181000000, 900000000, 901000000, 980000000, 981000000, 110000000, | 642 180000000, 181000000, 900000000, 901000000, 980000000, 981000000, 110000000, |
640 111000000, 112000000, 113000000, 114000000, 115000000, 116000000, 117000000, | 643 111000000, 112000000, 113000000, 114000000, 115000000, 116000000, 117000000, |
641 118000000, 119000000, 190000000, 191000000, 910000000, 911000000, 990000000, | 644 118000000, 119000000, 190000000, 191000000, 910000000, 911000000, 990000000, |
1205 9,6,3,3, 9,6,4,3, 9,6,5,3, 9,6,6,3, 9,6,7,3, 9,6,8,3, 9,6,9,3, 9,7,0,3, 9,7,1,3, | 1208 9,6,3,3, 9,6,4,3, 9,6,5,3, 9,6,6,3, 9,6,7,3, 9,6,8,3, 9,6,9,3, 9,7,0,3, 9,7,1,3, |
1206 9,7,2,3, 9,7,3,3, 9,7,4,3, 9,7,5,3, 9,7,6,3, 9,7,7,3, 9,7,8,3, 9,7,9,3, 9,8,0,3, | 1209 9,7,2,3, 9,7,3,3, 9,7,4,3, 9,7,5,3, 9,7,6,3, 9,7,7,3, 9,7,8,3, 9,7,9,3, 9,8,0,3, |
1207 9,8,1,3, 9,8,2,3, 9,8,3,3, 9,8,4,3, 9,8,5,3, 9,8,6,3, 9,8,7,3, 9,8,8,3, 9,8,9,3, | 1210 9,8,1,3, 9,8,2,3, 9,8,3,3, 9,8,4,3, 9,8,5,3, 9,8,6,3, 9,8,7,3, 9,8,8,3, 9,8,9,3, |
1208 9,9,0,3, 9,9,1,3, 9,9,2,3, 9,9,3,3, 9,9,4,3, 9,9,5,3, 9,9,6,3, 9,9,7,3, 9,9,8,3, | 1211 9,9,0,3, 9,9,1,3, 9,9,2,3, 9,9,3,3, 9,9,4,3, 9,9,5,3, 9,9,6,3, 9,9,7,3, 9,9,8,3, |
1209 9,9,9,3}; | 1212 9,9,9,3}; |
1213 | |
1214 #ifdef __cplusplus | |
1215 } | |
1210 #endif | 1216 #endif |
1211 | 1217 |
1218 #endif |