I would try to test the OP's problem that predecessor or successor are identical in numerical comparison.
I haven't looked too closely, but I suspect that the fact that the power operator (**) always returns an NV might be causing problems.
You might be better off using the << operator:
D:\>perl -MDevel::Peek -we "Dump (2**62); Dump ((2**62) + 1); Dump ((2
+**62) - 1);"
SV = NV(0x1d26f8d3f20) at 0x1d26f8d3f38
REFCNT = 1
FLAGS = (PADTMP,NOK,READONLY,PROTECT,pNOK)
NV = 4.6116860184273879e+18
SV = NV(0x1d26f8dbb88) at 0x1d26f8dbba0
REFCNT = 1
FLAGS = (PADTMP,NOK,READONLY,PROTECT,pNOK)
NV = 4.6116860184273879e+18
SV = NV(0x1d26f8d4ac0) at 0x1d26f8d4ad8
REFCNT = 1
FLAGS = (PADTMP,NOK,READONLY,PROTECT,pNOK)
NV = 4.6116860184273879e+18
D:\>perl -MDevel::Peek -we "Dump (1<<62); Dump ((1<<62) + 1); Dump ((1
+<<62) - 1);"
SV = IV(0x132ea044988) at 0x132ea044998
REFCNT = 1
FLAGS = (PADTMP,IOK,READONLY,PROTECT,pIOK)
IV = 4611686018427387904
SV = IV(0x132ea0449e8) at 0x132ea0449f8
REFCNT = 1
FLAGS = (PADTMP,IOK,READONLY,PROTECT,pIOK)
IV = 4611686018427387905
SV = IV(0x132ea0442c8) at 0x132ea0442d8
REFCNT = 1
FLAGS = (PADTMP,IOK,READONLY,PROTECT,pIOK)
IV = 4611686018427387903
The first one-liner results in 3 identical values; the second one-liner results in 3 different values.
It's all just part of the fun we have when we use the utterly insane perl configuration where IV precision is greater than NV precision ;-)
Cheers, Rob |