Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!rochester!crowl From: crowl@rochester.ARPA (Lawrence Crowl) Newsgroups: net.lang.c Subject: Re: Byte order Message-ID: <17610@rochester.ARPA> Date: Fri, 25-Apr-86 16:21:47 EDT Article-I.D.: rocheste.17610 Posted: Fri Apr 25 16:21:47 1986 Date-Received: Sun, 27-Apr-86 07:27:13 EDT References: <17162@rochester.ARPA> <139200027@uiucdcsb> <17312@rochester.ARPA> <1298@mmintl.UUCP> Reply-To: crowl@rochester.UUCP (Lawrence Crowl) Organization: U of Rochester, CS Dept, Rochester, NY 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