Better HN
topnewbestaskshowjobs
Log inSign up

Mjark

5 karma · joined May 1, 2015 (11y ago) · 1 submissions

Submissions

comment 9y ago · link · parent

This looks like a similar problem to providing a lexicographic binary encoding for the integers, and the technique given here reminds me of Exp-Golomb encoding.

A more fun problem is extending this scheme to support rational numbers. http://www.imada.sdu.dk/~kornerup/papers/lcf.ps.gz gives a neat scheme using continued fractions. (I've had a go at using it to implement a sort order preserving encoding that works for all the rationals at https://github.com/NegativeMjark/lexical-binary )