News for hackers. Stuff that matters.
Re:The surprisingly difficult problem of user-defined order ... by dmurray on Saturday January 16, 2021 @10:32AM (#25802813)
Yes, exactly this. Though it might be cleaner if instead of "no more than 63 bits" we say "no more than 2^63 spaces" on one side of the insert.

The author thinks it's very elegant that the rational numbers can be represented as a binary tree, and proposes some tricks to make the binary tree almost balanced and to make traversing it easy. You know what set is by default represented as a perfectly balanced binary tree where each bit in the representation tells you which way to go in the tree? The 64-bit integers.

There are no comments on this comment yet.