gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnu-arch-users] Re: [BUG] FEATURE PLANS: "perfect" summary deltas


From: Greek0
Subject: [Gnu-arch-users] Re: [BUG] FEATURE PLANS: "perfect" summary deltas
Date: Sun, 30 May 2004 22:29:29 +0200

On Fri, 28 May 2004 17:17:15 -0700 (PDT)
Tom Lord <address@hidden> wrote:
[Lots of things]

I've wondered what all that stuff ment, so I coded up a little python
script:
-- begin --
#!/usr/bin/python

import math

pot = [0,1,3,7,15,31,63,127,255]

BASIS = 0

def relative_revision_ordinal(a,b):
        return b-a

for REV in range(0,256):
        K = relative_revision_ordinal(BASIS, REV)
        if K in pot:
                print "REV = %d, New Basis = %d, K = %d" % (REV, BASIS,
K)
        else:
                # SIMPLER_ORDINAL is relative_revision_ordinal(BASIS,
SIMPLER)
                SIMPLER_ORDINAL = 2**(math.floor(math.log(K,2))) - 1
                SIMPLER = BASIS + SIMPLER_ORDINAL
                # SIMPLER is the new BASIS
                BASIS = SIMPLER
                print "REV = %d, New Basis = %d, K = %d" % (REV, BASIS,
K)
-- end --

That's how I understood your email.
REV = 0, New Basis = 0, K = 0
REV = 1, New Basis = 0, K = 1
REV = 2, New Basis = 1, K = 2
REV = 3, New Basis = 2, K = 2
REV = 4, New Basis = 3, K = 2
REV = 5, New Basis = 4, K = 2
...

Seems a bit strange.
I've had another version, where BASIS never changes, but Aaron told me
it was probably wrong, and in the meantime I agree with him. The
previous version gave this output:
REV = 0, New Basis = 0, K = 0
REV = 1, New Basis = 0, K = 1
REV = 2, New Basis = 1, K = 2
REV = 3, New Basis = 0, K = 3
REV = 4, New Basis = 3, K = 4
REV = 5, New Basis = 3, K = 5
REV = 6, New Basis = 3, K = 6
REV = 7, New Basis = 0, K = 7
REV = 8, New Basis = 7, K = 8
REV = 9, New Basis = 7, K = 9
...

I'm not sure any of these 2 is right, since the first one seems
generally weird, while there wouldn't be much sense for you to use that
long formula, if you just wanted the second result. Could you please
clearify?

Another point I'm not sure about: How much space will the +summary
version take up? It seems as if there was _lots_ of redundancy in your
proposed solution.

Cheers,
Greek0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]