Does a Vec<u8> with that calculation listed end up smaller than two integers of (presumably) arbitrary length?
When I read about the problem, I imagined using the mediant to calculate “between”. I think that mediant of $value and 1/1 would work for “after” and mediant of $value and 0/1 would work for “before”.
There must be a requirement I’m missing, though!
mediant: https://en.wikipedia.org/wiki/Mediant_(mathematics)