Trim private_implementation__powers_of_10 array

Binary size, before:
30344 gen/lib/c/clang-9-dynamic/wuffs-base-floatconv.lo
30488 gen/lib/c/clang-9-static/wuffs-base-floatconv.o
31992 gen/lib/c/gcc-dynamic/wuffs-base-floatconv.lo
31992 gen/lib/c/gcc-static/wuffs-base-floatconv.o

After:
29512 gen/lib/c/clang-9-dynamic/wuffs-base-floatconv.lo
29656 gen/lib/c/clang-9-static/wuffs-base-floatconv.o
31160 gen/lib/c/gcc-dynamic/wuffs-base-floatconv.lo
31160 gen/lib/c/gcc-static/wuffs-base-floatconv.o
This commit is contained in:
Nigel Tao committed 2020-09-15 22:14:30 +10:00
1 parent 8b45db0120
commit f2be4dd7cf
5 files changed
+68 -153

No files matched your search

+7 -48
View File
@@ -9986,20 +9986,20 @@ static const uint8_t wuffs_base__private_implementation__powers_of_5[0x051C] = {
// --------
// wuffs_base__private_implementation__powers_of_10 contains truncated
// approximations to the powers of 10, ranging from 1e-326 to 1e+310 inclusive,
// approximations to the powers of 10, ranging from 1e-307 to 1e+288 inclusive,
// as 637 uint32_t quintuples (128-bit mantissa, 32-bit base-2 exponent biased
// by 0x04BE (which is 1214)). The array size is 637 * 5 = 3185.
// by 0x04BE (which is 1214)). The array size is 596 * 5 = 2980.
//
// The 1214 bias in this look-up table equals 1023 + 191. 1023 is the bias for
// IEEE 754 double-precision floating point. 191 is ((3 * 64) - 1) and
// wuffs_base__private_implementation__parse_number_f64_eisel_lemire works with
// multiples-of-64-bit mantissas.
//
// For example, the third approximation, for 1e-324, consists of the uint32_t
// quintuple (0x828675B9, 0x52064CAC, 0x5DCE35EA, 0xCF42894A, 0x000A). The
// For example, the third approximation, for 1e-305, consists of the uint32_t
// quintuple (0xFE94DE87, 0x331ACDAB, 0x29ABA83C, 0xE0B62E29, 0x0049,). The
// first four form a little-endian uint128_t value. The last one is an int32_t
// value: -1140. Together, they represent the approximation to 1e-324:
// 0xCF42894A_5DCE35EA_52064CAC_828675B9 * (2 ** (0x000A - 0x04BE))
// 0xE0B62E29_29ABA83C_331ACDAB_FE94DE87 * (2 ** (0x0049 - 0x04BE))
//
// Similarly, 1e+4 is approximated by the uint64_t quintuple
// (0x00000000, 0x00000000, 0x00000000, 0x9C400000, 0x044C) which means:
@@ -10010,26 +10010,7 @@ static const uint8_t wuffs_base__private_implementation__powers_of_5[0x051C] = {
// 0xED63A231_D4C4FB27.4CA7AAA8_63EE4BDD * (2 ** (0x0520 - 0x04BE))
//
// This table was generated by by script/print-mpb-powers-of-10.go
static const uint32_t wuffs_base__private_implementation__powers_of_10[3185] = {
0xF7604B57, 0x014BB630, 0xFE98746D, 0x84A57695, 0x0004, // 1e-326
0x35385E2D, 0x419EA3BD, 0x7E3E9188, 0xA5CED43B, 0x0007, // 1e-325
0x828675B9, 0x52064CAC, 0x5DCE35EA, 0xCF42894A, 0x000A, // 1e-324
0xD1940993, 0x7343EFEB, 0x7AA0E1B2, 0x818995CE, 0x000E, // 1e-323
0xC5F90BF8, 0x1014EBE6, 0x19491A1F, 0xA1EBFB42, 0x0011, // 1e-322
0x77774EF6, 0xD41A26E0, 0x9F9B60A6, 0xCA66FA12, 0x0014, // 1e-321
0x955522B4, 0x8920B098, 0x478238D0, 0xFD00B897, 0x0017, // 1e-320
0x5D5535B0, 0x55B46E5F, 0x8CB16382, 0x9E20735E, 0x001B, // 1e-319
0x34AA831D, 0xEB2189F7, 0x2FDDBC62, 0xC5A89036, 0x001E, // 1e-318
0x01D523E4, 0xA5E9EC75, 0xBBD52B7B, 0xF712B443, 0x0021, // 1e-317
0x2125366E, 0x47B233C9, 0x55653B2D, 0x9A6BB0AA, 0x0025, // 1e-316
0x696E840A, 0x999EC0BB, 0xEABE89F8, 0xC1069CD4, 0x0028, // 1e-315
0x43CA250D, 0xC00670EA, 0x256E2C76, 0xF148440A, 0x002B, // 1e-314
0x6A5E5728, 0x38040692, 0x5764DBCA, 0x96CD2A86, 0x002F, // 1e-313
0x04F5ECF2, 0xC6050837, 0xED3E12BC, 0xBC807527, 0x0032, // 1e-312
0xC633682E, 0xF7864A44, 0xE88D976B, 0xEBA09271, 0x0035, // 1e-311
0xFBE0211D, 0x7AB3EE6A, 0x31587EA3, 0x93445B87, 0x0039, // 1e-310
0xBAD82964, 0x5960EA05, 0xFDAE9E4C, 0xB8157268, 0x003C, // 1e-309
0x298E33BD, 0x6FB92487, 0x3D1A45DF, 0xE61ACF03, 0x003F, // 1e-308
static const uint32_t wuffs_base__private_implementation__powers_of_10[2980] = {
0x79F8E056, 0xA5D3B6D4, 0x06306BAB, 0x8FD0C162, 0x0043, // 1e-307
0x9877186C, 0x8F48A489, 0x87BC8696, 0xB3C4F1BA, 0x0046, // 1e-306
0xFE94DE87, 0x331ACDAB, 0x29ABA83C, 0xE0B62E29, 0x0049, // 1e-305
@@ -10626,28 +10607,6 @@ static const uint32_t wuffs_base__private_implementation__powers_of_10[3185] = {
0xCCCC485D, 0x49ED8EAB, 0xD4BED6C0, 0x867F59A9, 0x07F5, // 1e286
0xBFFF5A74, 0x5C68F256, 0x49EE8C70, 0xA81F3014, 0x07F8, // 1e287
0x6FFF3111, 0x73832EEC, 0x5C6A2F8C, 0xD226FC19, 0x07FB, // 1e288
0xC5FF7EAB, 0xC831FD53, 0xD9C25DB7, 0x83585D8F, 0x07FF, // 1e289
0xB77F5E55, 0xBA3E7CA8, 0xD032F525, 0xA42E74F3, 0x0802, // 1e290
0xE55F35EB, 0x28CE1BD2, 0xC43FB26F, 0xCD3A1230, 0x0805, // 1e291
0xCF5B81B3, 0x7980D163, 0x7AA7CF85, 0x80444B5E, 0x0809, // 1e292
0xC332621F, 0xD7E105BC, 0x1951C366, 0xA0555E36, 0x080C, // 1e293
0xF3FEFAA7, 0x8DD9472B, 0x9FA63440, 0xC86AB5C3, 0x080F, // 1e294
0xF0FEB951, 0xB14F98F6, 0x878FC150, 0xFA856334, 0x0812, // 1e295
0x569F33D3, 0x6ED1BF9A, 0xD4B9D8D2, 0x9C935E00, 0x0816, // 1e296
0xEC4700C8, 0x0A862F80, 0x09E84F07, 0xC3B83581, 0x0819, // 1e297
0x2758C0FA, 0xCD27BB61, 0x4C6262C8, 0xF4A642E1, 0x081C, // 1e298
0xB897789C, 0x8038D51C, 0xCFBD7DBD, 0x98E7E9CC, 0x0820, // 1e299
0xE6BD56C3, 0xE0470A63, 0x03ACDD2C, 0xBF21E440, 0x0823, // 1e300
0xE06CAC74, 0x1858CCFC, 0x04981478, 0xEEEA5D50, 0x0826, // 1e301
0x0C43EBC8, 0x0F37801E, 0x02DF0CCB, 0x95527A52, 0x082A, // 1e302
0x8F54E6BA, 0xD3056025, 0x8396CFFD, 0xBAA718E6, 0x082D, // 1e303
0xF32A2069, 0x47C6B82E, 0x247C83FD, 0xE950DF20, 0x0830, // 1e304
0x57FA5441, 0x4CDC331D, 0x16CDD27E, 0x91D28B74, 0x0834, // 1e305
0xADF8E952, 0xE0133FE4, 0x1C81471D, 0xB6472E51, 0x0837, // 1e306
0xD97723A6, 0x58180FDD, 0x63A198E5, 0xE3D8F9E5, 0x083A, // 1e307
0xA7EA7648, 0x570F09EA, 0x5E44FF8F, 0x8E679C2F, 0x083E, // 1e308
0x51E513DA, 0x2CD2CC65, 0x35D63F73, 0xB201833B, 0x0841, // 1e309
0xA65E58D1, 0xF8077F7E, 0x034BCF4F, 0xDE81E40A, 0x0844, // 1e310
};
// wuffs_base__private_implementation__f64_powers_of_10 holds powers of 10 that
@@ -11637,7 +11596,7 @@ wuffs_base__private_implementation__parse_number_f64_eisel_lemire(
// The look-up table was constructed so that it is already normalized: the
// table entry's mantissa's MSB (most significant bit) is on.
const uint32_t* po10 =
&wuffs_base__private_implementation__powers_of_10[5 * (exp10 + 326)];
&wuffs_base__private_implementation__powers_of_10[5 * (exp10 + 307)];
// Normalize the man argument. The (man != 0) precondition means that a
// non-zero bit exists.