最近,我读了一些长度为 16 的十六进制数据,比如0x1000 0000 0000 0000
,但是当 print 0xffff ffff ffff ffff 时打印出一些奇怪的东西
awk '{printf("0x\n", 0x1000000000000000)}' output `0x1000000000000000` ok.
但是,取而代之的是
16 f awk '{printf("0x\n", 0xffffffffffffffff)}'
, 输出0
15 f awk '{printf("0x\n", 0xfffffffffffffff)}'
, 输出1000000000000000
(14 0)
15 f awk '{printf("0x\n", 0xfffffffffffffff0)}'
, 输出0
14 f awk '{printf("0x\n", 0xffffffffffffff)}'
, 输出 100000000000000
(13 0)
14 f awk '{printf("0x\n", 0xffffffffffffff0)}'
, 输出 100000000000000
(14 0)
14 f awk '{printf("0x\n", 0xffffffffffffff00)}'
, 输出 0
13f awk '{printf("0x\n", 0xfffffffffffff)}'
,输出 fffffffffffff
(13f)</p>
13f awk '{printf("0x\n", 0xfffffffffffff0)}'
,输出 fffffffffffff0
(13f)</p>
13f awk '{printf("0x\n", 0xfffffffffffff00)}'
,输出 fffffffffffff00
(13f)</p>
13f awk '{printf("0x\n", 0xfffffffffffff000)}'
,输出 fffffffffffff000
(13f)</p>
所以 13f 没问题,如何打印 16f?