cosmopolitan/third_party/python/Modules/unicodedata_tonumeric.c
Justine Tunney 47a53e143b Productionize new APE loader and more
The APE_NO_MODIFY_SELF loader payload has been moved out of the examples
folder and improved so that it works on BSD systems, and permits general
elf program headers. This brings its quality up enough that it should be
acceptable to use by default for many programs, e.g. Python, Lua, SQLite
and Python. It's the responsibility of the user to define an appropriate
TMPDIR if /tmp is considered an adversarial environment. Mac OS shall be
supported by APE_NO_MODIFY_SELF soon.

Fixes and improvements have been made to program_executable_name as it's
now the one true way to get the absolute path of the executing image.

This change fixes a memory leak in linenoise history loading, introduced
by performance optimizations in 51904e2687
This change fixes a longstanding regression with Mach system calls, that
23ae9dfceb back in February which impacted
our sched_yield() implementation, which is why no one noticed until now.

The Blinkenlights PC emulator has been improved. We now fix rendering on
XNU and BSD by not making the assumption that the kernel terminal driver
understands UTF8 since that seems to break its internal modeling of \r\n
which is now being addressed by using \e[𝑦H instead. The paneling is now
more compact in real mode so you won't need to make your font as tiny if
you're only emulating an 8086 program. The CLMUL ISA is now emulated too

This change also makes improvement to time. CLOCK_MONOTONIC now does the
right thing on Windows NT. The nanosecond time module functions added in
Python 3.7 have been backported.

This change doubles the performance of Argon2 password stretching simply
by not using its copy_block and xor_block helper functions, as they were
trivial to inline thus resulting in us needing to iterate over each 1024
byte block four fewer times.

This change makes code size improvements. _PyUnicode_ToNumeric() was 64k
in size and now it's 10k. The CJK codec lookup tables now use lazy delta
zigzag deflate (δzd) encoding which reduces their size from 600k to 200k
plus the code bloat caused by macro abuse in _decimal.c is now addressed
so our fully-loaded statically-linked hermetically-sealed Python virtual
interpreter container is now 9.4 megs in the default build mode and 5.5m
in MODE=tiny which leaves plenty of room for chibicc.

The pydoc web server now accommodates the use case of people who work by
SSH'ing into a different machine w/ python.com -m pydoc -p8080 -h0.0.0.0

Finally Python Capsulae delenda est and won't be supported in the future
2021-10-02 08:27:03 -07:00

3929 lines
33 KiB
C

#include "libc/nexgen32e/kompressor.h"
#include "third_party/python/Modules/unicodedata.h"
/* clang-format off */
/* GENERATED BY third_party/python/Tools/unicode/makeunicodedata.py 3.2 */
static const double kNumeric[] = {
-1/2.,
0.,
1.,
1/10.,
1/12.,
1/16.,
1/160.,
1/2.,
1/20.,
1/3.,
1/32.,
1/320.,
1/4.,
1/40.,
1/5.,
1/6.,
1/64.,
1/7.,
1/8.,
1/80.,
1/9.,
10.,
10/12.,
100.,
1000.,
10000.,
100000.,
1000000.,
10000000.,
100000000.,
10000000000.,
1000000000000.,
11.,
11/12.,
11/2.,
12.,
13.,
13/2.,
14.,
15.,
15/2.,
16.,
17.,
17/2.,
18.,
19.,
2.,
2/12.,
2/3.,
2/5.,
20.,
200.,
2000.,
20000.,
200000.,
20000000.,
21.,
216000.,
22.,
23.,
24.,
25.,
26.,
27.,
28.,
29.,
3.,
3/12.,
3/16.,
3/2.,
3/20.,
3/4.,
3/5.,
3/64.,
3/8.,
3/80.,
30.,
300.,
3000.,
30000.,
300000.,
31.,
32.,
33.,
34.,
35.,
36.,
37.,
38.,
39.,
4.,
4/12.,
4/5.,
40.,
400.,
4000.,
40000.,
400000.,
41.,
42.,
43.,
432000.,
44.,
45.,
46.,
47.,
48.,
49.,
5.,
5/12.,
5/2.,
5/6.,
5/8.,
50.,
500.,
5000.,
50000.,
500000.,
6.,
6/12.,
60.,
600.,
6000.,
60000.,
600000.,
7.,
7/12.,
7/2.,
7/8.,
70.,
700.,
7000.,
70000.,
700000.,
8.,
8/12.,
80.,
800.,
8000.,
80000.,
800000.,
9.,
9/12.,
9/2.,
90.,
900.,
9000.,
90000.,
900000.,
};
static const uint32_t kNumericCodes[] = {
0x0030,
0x0031,
0x0032,
0x0033,
0x0034,
0x0035,
0x0036,
0x0037,
0x0038,
0x0039,
0x00b2,
0x00b3,
0x00b9,
0x00bc,
0x00bd,
0x00be,
0x0660,
0x0661,
0x0662,
0x0663,
0x0664,
0x0665,
0x0666,
0x0667,
0x0668,
0x0669,
0x06f0,
0x06f1,
0x06f2,
0x06f3,
0x06f4,
0x06f5,
0x06f6,
0x06f7,
0x06f8,
0x06f9,
0x07c0,
0x07c1,
0x07c2,
0x07c3,
0x07c4,
0x07c5,
0x07c6,
0x07c7,
0x07c8,
0x07c9,
0x0966,
0x0967,
0x0968,
0x0969,
0x096a,
0x096b,
0x096c,
0x096d,
0x096e,
0x096f,
0x09e6,
0x09e7,
0x09e8,
0x09e9,
0x09ea,
0x09eb,
0x09ec,
0x09ed,
0x09ee,
0x09ef,
0x09f4,
0x09f5,
0x09f6,
0x09f7,
0x09f8,
0x09f9,
0x0a66,
0x0a67,
0x0a68,
0x0a69,
0x0a6a,
0x0a6b,
0x0a6c,
0x0a6d,
0x0a6e,
0x0a6f,
0x0ae6,
0x0ae7,
0x0ae8,
0x0ae9,
0x0aea,
0x0aeb,
0x0aec,
0x0aed,
0x0aee,
0x0aef,
0x0b66,
0x0b67,
0x0b68,
0x0b69,
0x0b6a,
0x0b6b,
0x0b6c,
0x0b6d,
0x0b6e,
0x0b6f,
0x0b72,
0x0b73,
0x0b74,
0x0b75,
0x0b76,
0x0b77,
0x0be6,
0x0be7,
0x0be8,
0x0be9,
0x0bea,
0x0beb,
0x0bec,
0x0bed,
0x0bee,
0x0bef,
0x0bf0,
0x0bf1,
0x0bf2,
0x0c66,
0x0c67,
0x0c68,
0x0c69,
0x0c6a,
0x0c6b,
0x0c6c,
0x0c6d,
0x0c6e,
0x0c6f,
0x0c78,
0x0c79,
0x0c7a,
0x0c7b,
0x0c7c,
0x0c7d,
0x0c7e,
0x0ce6,
0x0ce7,
0x0ce8,
0x0ce9,
0x0cea,
0x0ceb,
0x0cec,
0x0ced,
0x0cee,
0x0cef,
0x0d58,
0x0d59,
0x0d5a,
0x0d5b,
0x0d5c,
0x0d5d,
0x0d5e,
0x0d66,
0x0d67,
0x0d68,
0x0d69,
0x0d6a,
0x0d6b,
0x0d6c,
0x0d6d,
0x0d6e,
0x0d6f,
0x0d70,
0x0d71,
0x0d72,
0x0d73,
0x0d74,
0x0d75,
0x0d76,
0x0d77,
0x0d78,
0x0de6,
0x0de7,
0x0de8,
0x0de9,
0x0dea,
0x0deb,
0x0dec,
0x0ded,
0x0dee,
0x0def,
0x0e50,
0x0e51,
0x0e52,
0x0e53,
0x0e54,
0x0e55,
0x0e56,
0x0e57,
0x0e58,
0x0e59,
0x0ed0,
0x0ed1,
0x0ed2,
0x0ed3,
0x0ed4,
0x0ed5,
0x0ed6,
0x0ed7,
0x0ed8,
0x0ed9,
0x0f20,
0x0f21,
0x0f22,
0x0f23,
0x0f24,
0x0f25,
0x0f26,
0x0f27,
0x0f28,
0x0f29,
0x0f2a,
0x0f2b,
0x0f2c,
0x0f2d,
0x0f2e,
0x0f2f,
0x0f30,
0x0f31,
0x0f32,
0x0f33,
0x1040,
0x1041,
0x1042,
0x1043,
0x1044,
0x1045,
0x1046,
0x1047,
0x1048,
0x1049,
0x1090,
0x1091,
0x1092,
0x1093,
0x1094,
0x1095,
0x1096,
0x1097,
0x1098,
0x1099,
0x1369,
0x136a,
0x136b,
0x136c,
0x136d,
0x136e,
0x136f,
0x1370,
0x1371,
0x1372,
0x1373,
0x1374,
0x1375,
0x1376,
0x1377,
0x1378,
0x1379,
0x137a,
0x137b,
0x137c,
0x16ee,
0x16ef,
0x16f0,
0x17e0,
0x17e1,
0x17e2,
0x17e3,
0x17e4,
0x17e5,
0x17e6,
0x17e7,
0x17e8,
0x17e9,
0x17f0,
0x17f1,
0x17f2,
0x17f3,
0x17f4,
0x17f5,
0x17f6,
0x17f7,
0x17f8,
0x17f9,
0x1810,
0x1811,
0x1812,
0x1813,
0x1814,
0x1815,
0x1816,
0x1817,
0x1818,
0x1819,
0x1946,
0x1947,
0x1948,
0x1949,
0x194a,
0x194b,
0x194c,
0x194d,
0x194e,
0x194f,
0x19d0,
0x19d1,
0x19d2,
0x19d3,
0x19d4,
0x19d5,
0x19d6,
0x19d7,
0x19d8,
0x19d9,
0x19da,
0x1a80,
0x1a81,
0x1a82,
0x1a83,
0x1a84,
0x1a85,
0x1a86,
0x1a87,
0x1a88,
0x1a89,
0x1a90,
0x1a91,
0x1a92,
0x1a93,
0x1a94,
0x1a95,
0x1a96,
0x1a97,
0x1a98,
0x1a99,
0x1b50,
0x1b51,
0x1b52,
0x1b53,
0x1b54,
0x1b55,
0x1b56,
0x1b57,
0x1b58,
0x1b59,
0x1bb0,
0x1bb1,
0x1bb2,
0x1bb3,
0x1bb4,
0x1bb5,
0x1bb6,
0x1bb7,
0x1bb8,
0x1bb9,
0x1c40,
0x1c41,
0x1c42,
0x1c43,
0x1c44,
0x1c45,
0x1c46,
0x1c47,
0x1c48,
0x1c49,
0x1c50,
0x1c51,
0x1c52,
0x1c53,
0x1c54,
0x1c55,
0x1c56,
0x1c57,
0x1c58,
0x1c59,
0x2070,
0x2074,
0x2075,
0x2076,
0x2077,
0x2078,
0x2079,
0x2080,
0x2081,
0x2082,
0x2083,
0x2084,
0x2085,
0x2086,
0x2087,
0x2088,
0x2089,
0x2150,
0x2151,
0x2152,
0x2153,
0x2154,
0x2155,
0x2156,
0x2157,
0x2158,
0x2159,
0x215a,
0x215b,
0x215c,
0x215d,
0x215e,
0x215f,
0x2160,
0x2161,
0x2162,
0x2163,
0x2164,
0x2165,
0x2166,
0x2167,
0x2168,
0x2169,
0x216a,
0x216b,
0x216c,
0x216d,
0x216e,
0x216f,
0x2170,
0x2171,
0x2172,
0x2173,
0x2174,
0x2175,
0x2176,
0x2177,
0x2178,
0x2179,
0x217a,
0x217b,
0x217c,
0x217d,
0x217e,
0x217f,
0x2180,
0x2181,
0x2182,
0x2185,
0x2186,
0x2187,
0x2188,
0x2189,
0x2460,
0x2461,
0x2462,
0x2463,
0x2464,
0x2465,
0x2466,
0x2467,
0x2468,
0x2469,
0x246a,
0x246b,
0x246c,
0x246d,
0x246e,
0x246f,
0x2470,
0x2471,
0x2472,
0x2473,
0x2474,
0x2475,
0x2476,
0x2477,
0x2478,
0x2479,
0x247a,
0x247b,
0x247c,
0x247d,
0x247e,
0x247f,
0x2480,
0x2481,
0x2482,
0x2483,
0x2484,
0x2485,
0x2486,
0x2487,
0x2488,
0x2489,
0x248a,
0x248b,
0x248c,
0x248d,
0x248e,
0x248f,
0x2490,
0x2491,
0x2492,
0x2493,
0x2494,
0x2495,
0x2496,
0x2497,
0x2498,
0x2499,
0x249a,
0x249b,
0x24ea,
0x24eb,
0x24ec,
0x24ed,
0x24ee,
0x24ef,
0x24f0,
0x24f1,
0x24f2,
0x24f3,
0x24f4,
0x24f5,
0x24f6,
0x24f7,
0x24f8,
0x24f9,
0x24fa,
0x24fb,
0x24fc,
0x24fd,
0x24fe,
0x24ff,
0x2776,
0x2777,
0x2778,
0x2779,
0x277a,
0x277b,
0x277c,
0x277d,
0x277e,
0x277f,
0x2780,
0x2781,
0x2782,
0x2783,
0x2784,
0x2785,
0x2786,
0x2787,
0x2788,
0x2789,
0x278a,
0x278b,
0x278c,
0x278d,
0x278e,
0x278f,
0x2790,
0x2791,
0x2792,
0x2793,
0x2cfd,
0x3007,
0x3021,
0x3022,
0x3023,
0x3024,
0x3025,
0x3026,
0x3027,
0x3028,
0x3029,
0x3038,
0x3039,
0x303a,
0x3192,
0x3193,
0x3194,
0x3195,
0x3220,
0x3221,
0x3222,
0x3223,
0x3224,
0x3225,
0x3226,
0x3227,
0x3228,
0x3229,
0x3248,
0x3249,
0x324a,
0x324b,
0x324c,
0x324d,
0x324e,
0x324f,
0x3251,
0x3252,
0x3253,
0x3254,
0x3255,
0x3256,
0x3257,
0x3258,
0x3259,
0x325a,
0x325b,
0x325c,
0x325d,
0x325e,
0x325f,
0x3280,
0x3281,
0x3282,
0x3283,
0x3284,
0x3285,
0x3286,
0x3287,
0x3288,
0x3289,
0x32b1,
0x32b2,
0x32b3,
0x32b4,
0x32b5,
0x32b6,
0x32b7,
0x32b8,
0x32b9,
0x32ba,
0x32bb,
0x32bc,
0x32bd,
0x32be,
0x32bf,
0x3405,
0x3483,
0x382a,
0x3b4d,
0x4e00,
0x4e03,
0x4e07,
0x4e09,
0x4e5d,
0x4e8c,
0x4e94,
0x4e96,
0x4ebf,
0x4ec0,
0x4edf,
0x4ee8,
0x4f0d,
0x4f70,
0x5104,
0x5146,
0x5169,
0x516b,
0x516d,
0x5341,
0x5343,
0x5344,
0x5345,
0x534c,
0x53c1,
0x53c2,
0x53c3,
0x53c4,
0x56db,
0x58f1,
0x58f9,
0x5e7a,
0x5efe,
0x5eff,
0x5f0c,
0x5f0d,
0x5f0e,
0x5f10,
0x62fe,
0x634c,
0x67d2,
0x6f06,
0x7396,
0x767e,
0x8086,
0x842c,
0x8cae,
0x8cb3,
0x8d30,
0x9621,
0x9646,
0x964c,
0x9678,
0x96f6,
0xa620,
0xa621,
0xa622,
0xa623,
0xa624,
0xa625,
0xa626,
0xa627,
0xa628,
0xa629,
0xa6e6,
0xa6e7,
0xa6e8,
0xa6e9,
0xa6ea,
0xa6eb,
0xa6ec,
0xa6ed,
0xa6ee,
0xa6ef,
0xa830,
0xa831,
0xa832,
0xa833,
0xa834,
0xa835,
0xa8d0,
0xa8d1,
0xa8d2,
0xa8d3,
0xa8d4,
0xa8d5,
0xa8d6,
0xa8d7,
0xa8d8,
0xa8d9,
0xa900,
0xa901,
0xa902,
0xa903,
0xa904,
0xa905,
0xa906,
0xa907,
0xa908,
0xa909,
0xa9d0,
0xa9d1,
0xa9d2,
0xa9d3,
0xa9d4,
0xa9d5,
0xa9d6,
0xa9d7,
0xa9d8,
0xa9d9,
0xa9f0,
0xa9f1,
0xa9f2,
0xa9f3,
0xa9f4,
0xa9f5,
0xa9f6,
0xa9f7,
0xa9f8,
0xa9f9,
0xaa50,
0xaa51,
0xaa52,
0xaa53,
0xaa54,
0xaa55,
0xaa56,
0xaa57,
0xaa58,
0xaa59,
0xabf0,
0xabf1,
0xabf2,
0xabf3,
0xabf4,
0xabf5,
0xabf6,
0xabf7,
0xabf8,
0xabf9,
0xf96b,
0xf973,
0xf978,
0xf9b2,
0xf9d1,
0xf9d3,
0xf9fd,
0xff10,
0xff11,
0xff12,
0xff13,
0xff14,
0xff15,
0xff16,
0xff17,
0xff18,
0xff19,
};
static const uint8_t kNumericIndices[] = {
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
46,
66,
2,
12,
7,
71,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
5,
18,
68,
12,
71,
41,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
12,
7,
71,
5,
18,
68,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
21,
23,
24,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
2,
46,
66,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
6,
13,
75,
8,
3,
70,
14,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
21,
23,
24,
12,
7,
71,
5,
18,
68,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
7,
69,
110,
127,
143,
34,
37,
40,
43,
0,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
2,
46,
66,
90,
108,
118,
125,
134,
141,
21,
50,
76,
93,
113,
120,
129,
136,
144,
23,
25,
42,
44,
45,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
2,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
17,
20,
3,
9,
48,
14,
49,
72,
92,
15,
111,
18,
74,
112,
128,
2,
2,
46,
66,
90,
108,
118,
125,
134,
141,
21,
32,
35,
113,
23,
114,
24,
2,
46,
66,
90,
108,
118,
125,
134,
141,
21,
32,
35,
113,
23,
114,
24,
24,
115,
25,
118,
113,
116,
26,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
21,
32,
35,
36,
38,
39,
41,
42,
44,
45,
50,
2,
46,
66,
90,
108,
118,
125,
134,
141,
21,
32,
35,
36,
38,
39,
41,
42,
44,
45,
50,
2,
46,
66,
90,
108,
118,
125,
134,
141,
21,
32,
35,
36,
38,
39,
41,
42,
44,
45,
50,
1,
32,
35,
36,
38,
39,
41,
42,
44,
45,
50,
2,
46,
66,
90,
108,
118,
125,
134,
141,
21,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
21,
2,
46,
66,
90,
108,
118,
125,
134,
141,
21,
2,
46,
66,
90,
108,
118,
125,
134,
141,
21,
7,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
21,
50,
76,
2,
46,
66,
90,
2,
46,
66,
90,
108,
118,
125,
134,
141,
21,
21,
50,
76,
93,
113,
120,
129,
136,
56,
58,
59,
60,
61,
62,
63,
64,
65,
76,
81,
82,
83,
84,
85,
2,
46,
66,
90,
108,
118,
125,
134,
141,
21,
86,
87,
88,
89,
93,
98,
99,
100,
102,
103,
104,
105,
106,
107,
113,
108,
46,
108,
125,
2,
125,
25,
66,
141,
46,
108,
90,
29,
21,
24,
66,
108,
23,
29,
31,
46,
134,
118,
21,
24,
50,
76,
93,
66,
66,
66,
66,
90,
2,
2,
2,
141,
50,
2,
46,
66,
46,
21,
134,
125,
125,
141,
23,
90,
25,
46,
46,
46,
24,
118,
23,
118,
1,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
12,
7,
71,
5,
18,
68,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
66,
21,
46,
1,
118,
118,
21,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
};
static const uint32_t kNumericAstralCodes[] = {
0x10107,
0x10108,
0x10109,
0x1010a,
0x1010b,
0x1010c,
0x1010d,
0x1010e,
0x1010f,
0x10110,
0x10111,
0x10112,
0x10113,
0x10114,
0x10115,
0x10116,
0x10117,
0x10118,
0x10119,
0x1011a,
0x1011b,
0x1011c,
0x1011d,
0x1011e,
0x1011f,
0x10120,
0x10121,
0x10122,
0x10123,
0x10124,
0x10125,
0x10126,
0x10127,
0x10128,
0x10129,
0x1012a,
0x1012b,
0x1012c,
0x1012d,
0x1012e,
0x1012f,
0x10130,
0x10131,
0x10132,
0x10133,
0x10140,
0x10141,
0x10142,
0x10143,
0x10144,
0x10145,
0x10146,
0x10147,
0x10148,
0x10149,
0x1014a,
0x1014b,
0x1014c,
0x1014d,
0x1014e,
0x1014f,
0x10150,
0x10151,
0x10152,
0x10153,
0x10154,
0x10155,
0x10156,
0x10157,
0x10158,
0x10159,
0x1015a,
0x1015b,
0x1015c,
0x1015d,
0x1015e,
0x1015f,
0x10160,
0x10161,
0x10162,
0x10163,
0x10164,
0x10165,
0x10166,
0x10167,
0x10168,
0x10169,
0x1016a,
0x1016b,
0x1016c,
0x1016d,
0x1016e,
0x1016f,
0x10170,
0x10171,
0x10172,
0x10173,
0x10174,
0x10175,
0x10176,
0x10177,
0x10178,
0x1018a,
0x1018b,
0x102e1,
0x102e2,
0x102e3,
0x102e4,
0x102e5,
0x102e6,
0x102e7,
0x102e8,
0x102e9,
0x102ea,
0x102eb,
0x102ec,
0x102ed,
0x102ee,
0x102ef,
0x102f0,
0x102f1,
0x102f2,
0x102f3,
0x102f4,
0x102f5,
0x102f6,
0x102f7,
0x102f8,
0x102f9,
0x102fa,
0x102fb,
0x10320,
0x10321,
0x10322,
0x10323,
0x10341,
0x1034a,
0x103d1,
0x103d2,
0x103d3,
0x103d4,
0x103d5,
0x104a0,
0x104a1,
0x104a2,
0x104a3,
0x104a4,
0x104a5,
0x104a6,
0x104a7,
0x104a8,
0x104a9,
0x10858,
0x10859,
0x1085a,
0x1085b,
0x1085c,
0x1085d,
0x1085e,
0x1085f,
0x10879,
0x1087a,
0x1087b,
0x1087c,
0x1087d,
0x1087e,
0x1087f,
0x108a7,
0x108a8,
0x108a9,
0x108aa,
0x108ab,
0x108ac,
0x108ad,
0x108ae,
0x108af,
0x108fb,
0x108fc,
0x108fd,
0x108fe,
0x108ff,
0x10916,
0x10917,
0x10918,
0x10919,
0x1091a,
0x1091b,
0x109bc,
0x109bd,
0x109c0,
0x109c1,
0x109c2,
0x109c3,
0x109c4,
0x109c5,
0x109c6,
0x109c7,
0x109c8,
0x109c9,
0x109ca,
0x109cb,
0x109cc,
0x109cd,
0x109ce,
0x109cf,
0x109d2,
0x109d3,
0x109d4,
0x109d5,
0x109d6,
0x109d7,
0x109d8,
0x109d9,
0x109da,
0x109db,
0x109dc,
0x109dd,
0x109de,
0x109df,
0x109e0,
0x109e1,
0x109e2,
0x109e3,
0x109e4,
0x109e5,
0x109e6,
0x109e7,
0x109e8,
0x109e9,
0x109ea,
0x109eb,
0x109ec,
0x109ed,
0x109ee,
0x109ef,
0x109f0,
0x109f1,
0x109f2,
0x109f3,
0x109f4,
0x109f5,
0x109f6,
0x109f7,
0x109f8,
0x109f9,
0x109fa,
0x109fb,
0x109fc,
0x109fd,
0x109fe,
0x109ff,
0x10a40,
0x10a41,
0x10a42,
0x10a43,
0x10a44,
0x10a45,
0x10a46,
0x10a47,
0x10a48,
0x10a7d,
0x10a7e,
0x10a9d,
0x10a9e,
0x10a9f,
0x10aeb,
0x10aec,
0x10aed,
0x10aee,
0x10aef,
0x10b58,
0x10b59,
0x10b5a,
0x10b5b,
0x10b5c,
0x10b5d,
0x10b5e,
0x10b5f,
0x10b78,
0x10b79,
0x10b7a,
0x10b7b,
0x10b7c,
0x10b7d,
0x10b7e,
0x10b7f,
0x10ba9,
0x10baa,
0x10bab,
0x10bac,
0x10bad,
0x10bae,
0x10baf,
0x10cfa,
0x10cfb,
0x10cfc,
0x10cfd,
0x10cfe,
0x10cff,
0x10d30,
0x10d31,
0x10d32,
0x10d33,
0x10d34,
0x10d35,
0x10d36,
0x10d37,
0x10d38,
0x10d39,
0x10e60,
0x10e61,
0x10e62,
0x10e63,
0x10e64,
0x10e65,
0x10e66,
0x10e67,
0x10e68,
0x10e69,
0x10e6a,
0x10e6b,
0x10e6c,
0x10e6d,
0x10e6e,
0x10e6f,
0x10e70,
0x10e71,
0x10e72,
0x10e73,
0x10e74,
0x10e75,
0x10e76,
0x10e77,
0x10e78,
0x10e79,
0x10e7a,
0x10e7b,
0x10e7c,
0x10e7d,
0x10e7e,
0x10f1d,
0x10f1e,
0x10f1f,
0x10f20,
0x10f21,
0x10f22,
0x10f23,
0x10f24,
0x10f25,
0x10f26,
0x10f51,
0x10f52,
0x10f53,
0x10f54,
0x10fc5,
0x10fc6,
0x10fc7,
0x10fc8,
0x10fc9,
0x10fca,
0x10fcb,
0x11052,
0x11053,
0x11054,
0x11055,
0x11056,
0x11057,
0x11058,
0x11059,
0x1105a,
0x1105b,
0x1105c,
0x1105d,
0x1105e,
0x1105f,
0x11060,
0x11061,
0x11062,
0x11063,
0x11064,
0x11065,
0x11066,
0x11067,
0x11068,
0x11069,
0x1106a,
0x1106b,
0x1106c,
0x1106d,
0x1106e,
0x1106f,
0x110f0,
0x110f1,
0x110f2,
0x110f3,
0x110f4,
0x110f5,
0x110f6,
0x110f7,
0x110f8,
0x110f9,
0x11136,
0x11137,
0x11138,
0x11139,
0x1113a,
0x1113b,
0x1113c,
0x1113d,
0x1113e,
0x1113f,
0x111d0,
0x111d1,
0x111d2,
0x111d3,
0x111d4,
0x111d5,
0x111d6,
0x111d7,
0x111d8,
0x111d9,
0x111e1,
0x111e2,
0x111e3,
0x111e4,
0x111e5,
0x111e6,
0x111e7,
0x111e8,
0x111e9,
0x111ea,
0x111eb,
0x111ec,
0x111ed,
0x111ee,
0x111ef,
0x111f0,
0x111f1,
0x111f2,
0x111f3,
0x111f4,
0x112f0,
0x112f1,
0x112f2,
0x112f3,
0x112f4,
0x112f5,
0x112f6,
0x112f7,
0x112f8,
0x112f9,
0x11450,
0x11451,
0x11452,
0x11453,
0x11454,
0x11455,
0x11456,
0x11457,
0x11458,
0x11459,
0x114d0,
0x114d1,
0x114d2,
0x114d3,
0x114d4,
0x114d5,
0x114d6,
0x114d7,
0x114d8,
0x114d9,
0x11650,
0x11651,
0x11652,
0x11653,
0x11654,
0x11655,
0x11656,
0x11657,
0x11658,
0x11659,
0x116c0,
0x116c1,
0x116c2,
0x116c3,
0x116c4,
0x116c5,
0x116c6,
0x116c7,
0x116c8,
0x116c9,
0x11730,
0x11731,
0x11732,
0x11733,
0x11734,
0x11735,
0x11736,
0x11737,
0x11738,
0x11739,
0x1173a,
0x1173b,
0x118e0,
0x118e1,
0x118e2,
0x118e3,
0x118e4,
0x118e5,
0x118e6,
0x118e7,
0x118e8,
0x118e9,
0x118ea,
0x118eb,
0x118ec,
0x118ed,
0x118ee,
0x118ef,
0x118f0,
0x118f1,
0x118f2,
0x11950,
0x11951,
0x11952,
0x11953,
0x11954,
0x11955,
0x11956,
0x11957,
0x11958,
0x11959,
0x11c50,
0x11c51,
0x11c52,
0x11c53,
0x11c54,
0x11c55,
0x11c56,
0x11c57,
0x11c58,
0x11c59,
0x11c5a,
0x11c5b,
0x11c5c,
0x11c5d,
0x11c5e,
0x11c5f,
0x11c60,
0x11c61,
0x11c62,
0x11c63,
0x11c64,
0x11c65,
0x11c66,
0x11c67,
0x11c68,
0x11c69,
0x11c6a,
0x11c6b,
0x11c6c,
0x11d50,
0x11d51,
0x11d52,
0x11d53,
0x11d54,
0x11d55,
0x11d56,
0x11d57,
0x11d58,
0x11d59,
0x11da0,
0x11da1,
0x11da2,
0x11da3,
0x11da4,
0x11da5,
0x11da6,
0x11da7,
0x11da8,
0x11da9,
0x11fc0,
0x11fc1,
0x11fc2,
0x11fc3,
0x11fc4,
0x11fc5,
0x11fc6,
0x11fc7,
0x11fc8,
0x11fc9,
0x11fca,
0x11fcb,
0x11fcc,
0x11fcd,
0x11fce,
0x11fcf,
0x11fd0,
0x11fd1,
0x11fd2,
0x11fd3,
0x11fd4,
0x12400,
0x12401,
0x12402,
0x12403,
0x12404,
0x12405,
0x12406,
0x12407,
0x12408,
0x12409,
0x1240a,
0x1240b,
0x1240c,
0x1240d,
0x1240e,
0x1240f,
0x12410,
0x12411,
0x12412,
0x12413,
0x12414,
0x12415,
0x12416,
0x12417,
0x12418,
0x12419,
0x1241a,
0x1241b,
0x1241c,
0x1241d,
0x1241e,
0x1241f,
0x12420,
0x12421,
0x12422,
0x12423,
0x12424,
0x12425,
0x12426,
0x12427,
0x12428,
0x12429,
0x1242a,
0x1242b,
0x1242c,
0x1242d,
0x1242e,
0x1242f,
0x12430,
0x12431,
0x12432,
0x12433,
0x12434,
0x12435,
0x12436,
0x12437,
0x12438,
0x12439,
0x1243a,
0x1243b,
0x1243c,
0x1243d,
0x1243e,
0x1243f,
0x12440,
0x12441,
0x12442,
0x12443,
0x12444,
0x12445,
0x12446,
0x12447,
0x12448,
0x12449,
0x1244a,
0x1244b,
0x1244c,
0x1244d,
0x1244e,
0x1244f,
0x12450,
0x12451,
0x12452,
0x12453,
0x12454,
0x12455,
0x12456,
0x12457,
0x12458,
0x12459,
0x1245a,
0x1245b,
0x1245c,
0x1245d,
0x1245e,
0x1245f,
0x12460,
0x12461,
0x12462,
0x12463,
0x12464,
0x12465,
0x12466,
0x12467,
0x12468,
0x12469,
0x1246a,
0x1246b,
0x1246c,
0x1246d,
0x1246e,
0x16a60,
0x16a61,
0x16a62,
0x16a63,
0x16a64,
0x16a65,
0x16a66,
0x16a67,
0x16a68,
0x16a69,
0x16b50,
0x16b51,
0x16b52,
0x16b53,
0x16b54,
0x16b55,
0x16b56,
0x16b57,
0x16b58,
0x16b59,
0x16b5b,
0x16b5c,
0x16b5d,
0x16b5e,
0x16b5f,
0x16b60,
0x16b61,
0x16e80,
0x16e81,
0x16e82,
0x16e83,
0x16e84,
0x16e85,
0x16e86,
0x16e87,
0x16e88,
0x16e89,
0x16e8a,
0x16e8b,
0x16e8c,
0x16e8d,
0x16e8e,
0x16e8f,
0x16e90,
0x16e91,
0x16e92,
0x16e93,
0x16e94,
0x16e95,
0x16e96,
0x1d2e0,
0x1d2e1,
0x1d2e2,
0x1d2e3,
0x1d2e4,
0x1d2e5,
0x1d2e6,
0x1d2e7,
0x1d2e8,
0x1d2e9,
0x1d2ea,
0x1d2eb,
0x1d2ec,
0x1d2ed,
0x1d2ee,
0x1d2ef,
0x1d2f0,
0x1d2f1,
0x1d2f2,
0x1d2f3,
0x1d360,
0x1d361,
0x1d362,
0x1d363,
0x1d364,
0x1d365,
0x1d366,
0x1d367,
0x1d368,
0x1d369,
0x1d36a,
0x1d36b,
0x1d36c,
0x1d36d,
0x1d36e,
0x1d36f,
0x1d370,
0x1d371,
0x1d372,
0x1d373,
0x1d374,
0x1d375,
0x1d376,
0x1d377,
0x1d378,
0x1d7ce,
0x1d7cf,
0x1d7d0,
0x1d7d1,
0x1d7d2,
0x1d7d3,
0x1d7d4,
0x1d7d5,
0x1d7d6,
0x1d7d7,
0x1d7d8,
0x1d7d9,
0x1d7da,
0x1d7db,
0x1d7dc,
0x1d7dd,
0x1d7de,
0x1d7df,
0x1d7e0,
0x1d7e1,
0x1d7e2,
0x1d7e3,
0x1d7e4,
0x1d7e5,
0x1d7e6,
0x1d7e7,
0x1d7e8,
0x1d7e9,
0x1d7ea,
0x1d7eb,
0x1d7ec,
0x1d7ed,
0x1d7ee,
0x1d7ef,
0x1d7f0,
0x1d7f1,
0x1d7f2,
0x1d7f3,
0x1d7f4,
0x1d7f5,
0x1d7f6,
0x1d7f7,
0x1d7f8,
0x1d7f9,
0x1d7fa,
0x1d7fb,
0x1d7fc,
0x1d7fd,
0x1d7fe,
0x1d7ff,
0x1e140,
0x1e141,
0x1e142,
0x1e143,
0x1e144,
0x1e145,
0x1e146,
0x1e147,
0x1e148,
0x1e149,
0x1e2f0,
0x1e2f1,
0x1e2f2,
0x1e2f3,
0x1e2f4,
0x1e2f5,
0x1e2f6,
0x1e2f7,
0x1e2f8,
0x1e2f9,
0x1e8c7,
0x1e8c8,
0x1e8c9,
0x1e8ca,
0x1e8cb,
0x1e8cc,
0x1e8cd,
0x1e8ce,
0x1e8cf,
0x1e950,
0x1e951,
0x1e952,
0x1e953,
0x1e954,
0x1e955,
0x1e956,
0x1e957,
0x1e958,
0x1e959,
0x1ec71,
0x1ec72,
0x1ec73,
0x1ec74,
0x1ec75,
0x1ec76,
0x1ec77,
0x1ec78,
0x1ec79,
0x1ec7a,
0x1ec7b,
0x1ec7c,
0x1ec7d,
0x1ec7e,
0x1ec7f,
0x1ec80,
0x1ec81,
0x1ec82,
0x1ec83,
0x1ec84,
0x1ec85,
0x1ec86,
0x1ec87,
0x1ec88,
0x1ec89,
0x1ec8a,
0x1ec8b,
0x1ec8c,
0x1ec8d,
0x1ec8e,
0x1ec8f,
0x1ec90,
0x1ec91,
0x1ec92,
0x1ec93,
0x1ec94,
0x1ec95,
0x1ec96,
0x1ec97,
0x1ec98,
0x1ec99,
0x1ec9a,
0x1ec9b,
0x1ec9c,
0x1ec9d,
0x1ec9e,
0x1ec9f,
0x1eca0,
0x1eca1,
0x1eca2,
0x1eca3,
0x1eca4,
0x1eca5,
0x1eca6,
0x1eca7,
0x1eca8,
0x1eca9,
0x1ecaa,
0x1ecab,
0x1ecad,
0x1ecae,
0x1ecaf,
0x1ecb1,
0x1ecb2,
0x1ecb3,
0x1ecb4,
0x1ed01,
0x1ed02,
0x1ed03,
0x1ed04,
0x1ed05,
0x1ed06,
0x1ed07,
0x1ed08,
0x1ed09,
0x1ed0a,
0x1ed0b,
0x1ed0c,
0x1ed0d,
0x1ed0e,
0x1ed0f,
0x1ed10,
0x1ed11,
0x1ed12,
0x1ed13,
0x1ed14,
0x1ed15,
0x1ed16,
0x1ed17,
0x1ed18,
0x1ed19,
0x1ed1a,
0x1ed1b,
0x1ed1c,
0x1ed1d,
0x1ed1e,
0x1ed1f,
0x1ed20,
0x1ed21,
0x1ed22,
0x1ed23,
0x1ed24,
0x1ed25,
0x1ed26,
0x1ed27,
0x1ed28,
0x1ed29,
0x1ed2a,
0x1ed2b,
0x1ed2c,
0x1ed2d,
0x1ed2f,
0x1ed30,
0x1ed31,
0x1ed32,
0x1ed33,
0x1ed34,
0x1ed35,
0x1ed36,
0x1ed37,
0x1ed38,
0x1ed39,
0x1ed3a,
0x1ed3b,
0x1ed3c,
0x1ed3d,
0x1f100,
0x1f101,
0x1f102,
0x1f103,
0x1f104,
0x1f105,
0x1f106,
0x1f107,
0x1f108,
0x1f109,
0x1f10a,
0x1f10b,
0x1f10c,
0x1fbf0,
0x1fbf1,
0x1fbf2,
0x1fbf3,
0x1fbf4,
0x1fbf5,
0x1fbf6,
0x1fbf7,
0x1fbf8,
0x1fbf9,
0x20001,
0x20064,
0x200e2,
0x20121,
0x2092a,
0x20983,
0x2098c,
0x2099c,
0x20aea,
0x20afd,
0x20b19,
0x22390,
0x22998,
0x23b1b,
0x2626d,
0x2f890,
};
static const uint8_t kNumericAstralIndices[] = {
2,
46,
66,
90,
108,
118,
125,
134,
141,
21,
50,
76,
93,
113,
120,
129,
136,
144,
23,
51,
77,
94,
114,
121,
130,
137,
145,
24,
52,
78,
95,
115,
122,
131,
138,
146,
25,
53,
79,
96,
116,
123,
132,
139,
147,
12,
7,
2,
108,
113,
114,
115,
116,
108,
21,
113,
23,
114,
24,
115,
108,
21,
113,
23,
114,
24,
25,
116,
21,
2,
2,
2,
46,
46,
46,
46,
108,
21,
21,
21,
21,
21,
76,
113,
113,
113,
113,
23,
77,
114,
114,
114,
114,
114,
24,
115,
108,
113,
7,
7,
48,
71,
1,
12,
2,
46,
66,
90,
108,
118,
125,
134,
141,
21,
50,
76,
93,
113,
120,
129,
136,
144,
23,
51,
77,
94,
114,
121,
130,
137,
145,
2,
108,
21,
113,
144,
145,
2,
46,
21,
50,
23,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
2,
46,
66,
21,
50,
23,
24,
25,
2,
46,
66,
90,
108,
21,
50,
2,
46,
66,
90,
90,
108,
21,
50,
23,
2,
108,
21,
50,
23,
2,
21,
50,
23,
46,
66,
33,
7,
2,
46,
66,
90,
108,
118,
125,
134,
141,
21,
50,
76,
93,
113,
120,
129,
23,
51,
77,
94,
114,
121,
130,
137,
145,
24,
52,
78,
95,
115,
122,
131,
138,
146,
25,
53,
79,
96,
116,
123,
132,
139,
147,
26,
54,
80,
97,
117,
124,
133,
140,
148,
4,
47,
67,
91,
109,
119,
126,
135,
142,
22,
2,
46,
66,
90,
21,
50,
23,
24,
7,
2,
113,
2,
21,
50,
2,
108,
21,
50,
23,
2,
46,
66,
90,
21,
50,
23,
24,
2,
46,
66,
90,
21,
50,
23,
24,
2,
46,
66,
90,
21,
50,
23,
2,
108,
21,
113,
23,
24,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
2,
46,
66,
90,
108,
118,
125,
134,
141,
21,
50,
76,
93,
113,
120,
129,
136,
144,
23,
51,
77,
94,
114,
121,
130,
137,
145,
7,
12,
9,
48,
2,
46,
66,
90,
108,
21,
50,
76,
23,
7,
2,
21,
50,
23,
2,
46,
66,
90,
21,
50,
23,
2,
46,
66,
90,
108,
118,
125,
134,
141,
21,
50,
76,
93,
113,
120,
129,
136,
144,
23,
24,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
2,
46,
66,
90,
108,
118,
125,
134,
141,
21,
50,
76,
93,
113,
120,
129,
136,
144,
23,
24,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
21,
50,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
21,
50,
76,
93,
113,
120,
129,
136,
144,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
2,
46,
66,
90,
108,
118,
125,
134,
141,
21,
50,
76,
93,
113,
120,
129,
136,
144,
23,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
11,
6,
19,
16,
13,
10,
75,
73,
8,
5,
5,
3,
18,
70,
68,
14,
12,
7,
7,
71,
11,
46,
66,
90,
108,
118,
125,
134,
141,
66,
90,
108,
118,
125,
134,
141,
90,
108,
118,
125,
134,
141,
2,
46,
66,
90,
108,
118,
125,
134,
141,
2,
46,
66,
90,
108,
46,
66,
66,
90,
108,
118,
125,
134,
141,
2,
46,
66,
66,
90,
108,
57,
101,
2,
46,
66,
66,
90,
108,
66,
66,
90,
90,
90,
90,
118,
125,
125,
125,
134,
134,
141,
141,
141,
141,
46,
66,
90,
108,
118,
2,
46,
66,
90,
90,
108,
108,
46,
66,
2,
46,
9,
48,
111,
9,
48,
18,
12,
15,
12,
12,
7,
9,
48,
93,
113,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
21,
23,
25,
27,
29,
30,
31,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
21,
32,
35,
36,
38,
39,
41,
42,
44,
45,
2,
46,
66,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
21,
32,
35,
36,
38,
39,
41,
42,
44,
45,
2,
46,
66,
90,
108,
118,
125,
134,
141,
21,
50,
76,
93,
113,
120,
129,
136,
144,
2,
46,
66,
90,
108,
2,
108,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
2,
46,
66,
90,
108,
118,
125,
134,
141,
21,
50,
76,
93,
113,
120,
129,
136,
144,
23,
51,
77,
94,
114,
121,
130,
137,
145,
24,
52,
78,
95,
115,
122,
131,
138,
146,
25,
53,
79,
96,
116,
123,
132,
139,
147,
26,
54,
26,
28,
55,
2,
46,
66,
90,
108,
118,
125,
134,
141,
12,
7,
71,
2,
46,
25,
26,
2,
46,
66,
90,
108,
118,
125,
134,
141,
21,
50,
76,
93,
113,
120,
129,
136,
144,
23,
51,
77,
94,
114,
121,
130,
137,
145,
24,
52,
78,
95,
115,
122,
131,
138,
146,
25,
53,
79,
96,
116,
123,
132,
139,
147,
46,
66,
90,
108,
118,
125,
134,
141,
21,
94,
121,
52,
25,
7,
15,
1,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
1,
1,
1,
2,
46,
66,
90,
108,
118,
125,
134,
141,
125,
90,
90,
108,
2,
76,
93,
93,
118,
66,
66,
46,
66,
66,
90,
141,
};
/* Returns the numeric value as double for Unicode characters
* having this property, -1.0 otherwise.
*/
double _PyUnicode_ToNumeric(Py_UCS4 c)
{
int l, m, r;
if (c <= 0xFFFF) {
l = 0;
r = sizeof(kNumericCodes) / sizeof(kNumericCodes[0]) - 1;
while (l <= r) {
m = (l + r) >> 1;
if (kNumericCodes[m] < c) {
l = m + 1;
} else if (kNumericCodes[m] > c) {
r = m - 1;
} else {
return kNumeric[kNumericIndices[m]];
}
}
} else {
l = 0;
r = sizeof(kNumericAstralCodes) / sizeof(kNumericAstralCodes[0]) - 1;
while (l <= r) {
m = (l + r) >> 1;
if (kNumericAstralCodes[m] < c) {
l = m + 1;
} else if (kNumericAstralCodes[m] > c) {
r = m - 1;
} else {
return kNumeric[kNumericAstralIndices[m]];
}
}
}
return -1;
}