Re: Mapping rationals to binary strings while preserving order



On Fri, 14 Jul 2006, Chris wrote:

Maybe I'm not understanding the problem, but I think there's a much
simpler solution. Just store your number in a standard 4 or 8 byte IEEE
floating point format. The first few bits store the scale, and the rest
store the most significant bits of the value. It sorts lexicographically
just fine.


Yes, but I'm interested in a mapping that works for all rational numbers,
not just those that can be represented in the 4- or 8-byte IEEE format.

-----
Janez


.



Relevant Pages

  • Re: GENERATING AUTOMATIC NUMBERS
    ... I suggest you store two fields: ... > Date-auto increment format. ... Year in NN format, Julian Date in NNN format, ... I would like this feature to key off when the the preceding field, ...
    (microsoft.public.access.formscoding)
  • Re: A PC for music management and storage.
    ... access my audio system to manage and store music etc. ... MP3 format, about 1 Mb per minute, or WAV ... Hard drives are amazingly ... Bus and RAM speed may be important. ...
    (rec.music.classical.recordings)
  • Re: Sum of hh:mm:ss
    ... When you say you store it formatted, do you mean that you store it in ... In fact I defined some kind of datatype, that such a field is a text ... format, and as such stored. ... arithmatic processing, etc. based on the datatype of that field. ...
    (comp.databases.ms-access)
  • Re: Suggestion needed on data storage format in text file
    ... the mailbox file and store the summary in the text file for fast ... Then you run into the problem of someone who gets very verbose with their subject line and exceeds the 100 characters. ... Two other ways - use CSV format, which is well documented and supported by PHP and other programs. ...
    (comp.lang.php)
  • Re: Max Function
    ... David: apparently my excel has a custom number format that I had forgotten ... Store number in A2:A10 ... criteria has been assigned a value and the Total row sums the total ...
    (microsoft.public.excel.worksheet.functions)