On Tue, Feb 7, 2017 at 12:03 PM, Zefram <[email protected]> wrote: > Clive D.W. Feather wrote: >>probability is that TAI-UTC will ever be negative? Should data structures >>be designed to handle this case or not bother? > > Data structures should certainly allow for the possibility, but in > space-constrained cases can be optimised based on the understanding that > it's relatively unlikely. If a fixed-size field is being designed, > then the range of TAI-UTC values that it can accommodate can be made > asymmetric, favouring positive values. An 8-bit field might reasonably be > made to use excess-32 encoding, encompassing values [-32, 223], giving it > a good chance of covering the next century's evolution of Earth rotation. > (8 bits is minimal for that design objective; I'd press for more bits > if possible.) A variable-length encoding can in principle cover all > possible values, but could still benefit by making the representations > of negative numbers longer than the representations of positive numbers.
So long as after the number is decoded, it's decoded into an signed number. This is a clever way to get a fuller range of likely leaps without precluding rare, but possible events. Warner _______________________________________________ LEAPSECS mailing list [email protected] https://pairlist6.pair.net/mailman/listinfo/leapsecs
