Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!husc6!harvard!seismo!hao!hplabs!hpda!hpisoa2!hpitg!rochester!crowl@rochester From: crowl@rochester Newsgroups: net.lang.c Subject: Re: Re: Byte order Message-ID: <17610@rochester> Date: Sat, 26-Apr-86 01:21:00 EDT Article-I.D.: rocheste.17610 Posted: Sat Apr 26 01:21:00 1986 Date-Received: Tue, 13-May-86 03:09:37 EDT References: <2522@utcsri> Lines: 23 In article <1298@mmintl.UUCP> franka@mmintl.UUCP (Frank Adams) writes: ]In article <17312@rochester.ARPA> crowl@rochester.UUCP (Lawrence Crowl) writes: ]]CHALLENGE: Come up with a scheme for representing numbers, and a sorting ]]scheme in which numbers sort naturally. Your scheme must deal with variable ]]length character strings and variable size numbers. That is, you cannot ]]require strings to be padded with nulls, or numbers to be padded with zeros. ] ]Basically, you use a unary notation (pure or modified) to indicate how long ]the number is, and the number follows. Using the scheme above, 257 would ]be ZZZ257. One and a half would be Z15. This is essentially floating point ]notation. ... This has to be modified a bit to deal with negative numbers. ... ]Also, for negative numbers, the digits should be in (9's) complement form. ... ]This can of course be done somewhat better. A higher radix can be used, and ]the exponent encoding can be further optimized. But the point is to describe ]the approach, not to work out all the details. This seems good to me. If there are no radical alternatives, lets close the issue. -- Lawrence Crowl 716-275-5766 University of Rochester Computer Science Department ...!{allegra,decvax,seismo}!rochester!crowl Rochester, New York, 14627