1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

_vinit: use static initialization of large const []number

This commit is contained in:
Delyan Angelov
2020-06-12 09:41:25 +03:00
parent 0845a9b7c3
commit b306c04e99
6 changed files with 14 additions and 14 deletions

View File

@ -26,7 +26,7 @@ powers_of_10 = [
u64(1e16),
u64(1e17)
// We only need to find the length of at most 17 digit numbers.
]
]!!
pow5_split_32 = [
u64(1152921504606846976), u64(1441151880758558720), u64(1801439850948198400), u64(2251799813685248000),
@ -41,7 +41,7 @@ pow5_split_32 = [
u64(1734723475976807094), u64(2168404344971008868), u64(1355252715606880542), u64(1694065894508600678),
u64(2117582368135750847), u64(1323488980084844279), u64(1654361225106055349), u64(2067951531382569187),
u64(1292469707114105741), u64(1615587133892632177), u64(2019483917365790221)
]
]!!
pow5_inv_split_32 = [
u64(576460752303423489), u64(461168601842738791), u64(368934881474191033), u64(295147905179352826),
@ -52,7 +52,7 @@ pow5_inv_split_32 = [
u64(425352958651173080), u64(340282366920938464), u64(544451787073501542), u64(435561429658801234),
u64(348449143727040987), u64(557518629963265579), u64(446014903970612463), u64(356811923176489971),
u64(570899077082383953), u64(456719261665907162), u64(365375409332725730)
]
]!!
pow5_split_64 =[
Uint128{u64(0x0000000000000000), u64(0x0100000000000000)},
@ -381,7 +381,7 @@ pow5_split_64 =[
Uint128{u64(0x848ce53c07bb3daf), u64(0x01f9ec583bdc7058)},
Uint128{u64(0x52d80f4584d5068d), u64(0x013c33b72569c637)},
Uint128{u64(0x278e1316e60a4831), u64(0x018b40a4eec437c5)}
]
]!!
pow5_inv_split_64 = [
Uint128{u64(0x0000000000000001), u64(0x0400000000000000)},
@ -676,5 +676,5 @@ pow5_inv_split_64 = [
Uint128{u64(0x952c15cca1ad12b5), u64(0x03e5eb8f434911bc)},
Uint128{u64(0x775677d6e7bda891), u64(0x031e560c35d40e30)},
Uint128{u64(0xc5dec645863153a7), u64(0x027eab3cf7dcd826)}
]
]!!
)