Oh, sorry, made one more attemp and now I see your algorithm differently. So you propose to use oE and oV as a markers of borders for what I call Realm. But there may be very little significant bits in one of this ranges. pg_sphere and PostGiS extensions tried to use 1 as a marker, with alike formula. And that generated not a good tree. Here's how they done it https://github.com/postgis/postgis/commit/9569e898078eeac8928891e8019ede2cbf27d06f
I'll try to compose a patch for your formula later, I think we should just try and see, it is easier than to reason about digital floating points. Best regards, Andrey Borodin, Octonica & Ural Federal University. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers