I have this hash of UInt64
s below.
private WITNESS_RANGES = {
341_531u64 => [9345883071009581737u64],
1_050_535_501u64 => [336781006125u64, 9639812373923155u64],
350_269_456_337u64 => [4230279247111683200, 14694767155120705706, 16641139526367750375] of UInt64,
55_245_642_489_451u64 => [2, 141889084524735, 1199124725622454117, 11096072698276303650] of UInt64,
7_999_252_175_582_851u64 => [2, 4130806001517, 149795463772692060, 186635894390467037, 3967304179347715805] of UInt64,
585_226_005_592_931_977u64 => [2, 123635709730000, 9233062284813009, 43835965440333360, 761179012939631437, 1263739024124850375] of UInt64,
18_446_744_073_709_551_615u64 => [2, 325, 9375, 28178, 450775, 9780504, 1795265022] of UInt64,
318_665_857_834_031_151_167_461u128 => [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37] of UInt64,
3_317_044_064_679_887_385_961_981u128 => [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41] of UInt64
}
I get this warning for some 19 digits values for the 3rd|4th hash arrays.
76 | 350_269_456_337u64 => [4230279247111683200, 14694767155120705706, 16641139526367750375] of UInt64,
^
Warning: 14694767155120705706 doesn't fit in an Int64, try using the suffix u64 or i128
In computeC2c.cr:76:73
76 | 350_269_456_337u64 => [4230279247111683200, 14694767155120705706, 16641139526367750375] of UInt64,
^
Warning: 16641139526367750375 doesn't fit in an Int64, try using the suffix u64 or i128
In computeC2c.cr:77:74
77 | 55_245_642_489_451u64 => [2, 141889084524735, 1199124725622454117, 11096072698276303650] of UInt64,
^
Warning: 11096072698276303650 doesn't fit in an Int64, try using the suffix u64 or i128
However, those values fit within 64-bits, which Max is
(2**64 - 1) => 18446744073709551615
When I explicitly define the arrays as xxxxxxxxxxxu64
values there are no warnings.
Either way, the code appears to work with the warnings.
Since all those values are valid UInt64
s isn’t this any error in parsing them?
Using Crystal 1.11.2.