fn issq_mod4095(x: u64) -> bool { const SQTABLE_MOD4095: [u64; 64] = [ 0x2001002010213,0x4200001008028001,0x20000010004,0x80200082010,0x1800008200044029, 0x120080000010,0x2200000080410400,0x8100041000200800,0x800004000020100,0x402000400082201, 0x9004000040,0x800002000880,0x18002000012000,0x801208,0x26100000804010, 0x80000080000002,0x108040040101045,0x20c00004000102,0x400000100c0010,0x1300000040208, 0x804000020010000,0x1008402002400080,0x201001000200040,0x4402000000806000,0x10402000000, 0x1040008001200801,0x4080000000020400,0x10083080000002,0x8220140000040000,0x800084020100000, 0x80010400010000,0x1200020108008060,0x180000000,0x400002400000018,0x4241000200, 0x100800000000,0x10201008400483,0xc008000208201000,0x800420000100,0x2010002000410, 0x28041000000,0x4010080000024,0x400480010010080,0x200040028000008,0x100810084020, 0x20c0401000080000,0x1000240000220000,0x4000020800,0x410000000480000,0x8004008000804201, 0x806020000104000,0x2080002000211000,0x1001008001000,0x20000010024000,0x480200002040000, 0x48200044008000,0x100000000010080,0x80090400042,0x41040200800200,0x4000020100110, 0x2000400082200010,0x1008200000000040,0x2004800002,0x2002010000080 ]; let p = (x % 4095) as usize; (SQTABLE_MOD4095[p >> 6] >> (p & 63)) & 1 == 1 } 64bit数の素数判定 20220927 Mizar/みざー <http://github.com/mizar> 73