From owner-freebsd-questions Sat Jan 27 12:56:30 2001 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-65-26-235-186.mmcable.com [65.26.235.186]) by hub.freebsd.org (Postfix) with SMTP id D956D37B402 for ; Sat, 27 Jan 2001 12:56:05 -0800 (PST) Received: (qmail 16493 invoked by uid 100); 27 Jan 2001 20:56:05 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14963.13797.116165.382738@guru.mired.org> Date: Sat, 27 Jan 2001 14:56:05 -0600 (CST) To: Salvo Bartolotta Cc: questions@freebsd.org Subject: OT again: Re: hexidecimal literacy In-Reply-To: <20010127.20140200@bartequi.ottodomain.org> References: <14963.8033.752142.149320@guru.mired.org> <20010127.20140200@bartequi.ottodomain.org> X-Mailer: VM 6.75 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Salvo Bartolotta types: > >>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<< > On 1/27/01, 8:20:01 PM, Mike Meyer wrote regarding Re: > hexidecimal literacy: > > Mark B. Withers types: > > > Oh gosh! > > > I thought I understood it before, but looking at it like this > > > simplifies it dramaticly!! > > Just remember that this applies to interesting bases like 0, 1, Pi and > > negative numbers :-). > Hmm, I am afraid you are exaggerating a bit :-) Actually, I'm not. I'm pretty sure this was from Knuth, back when I was an undergrad. Unfortunately, my books are all in storage, so I can't check on it :-(. > > 1) a positional notation making use of negative bases looks very > awkward/impractical (you would have to utilize negative coefficients); > OTOH, when working with such a positional notation, you are supposed > to be working on N (ie the set of the "natural" numbers, or positive > integers); and to add to all this, there are a number of approaches to > the "construction" of N itself (Peano's, Cipolla's, the set theory > with all its subtle problems... cf Bourbaki[sm]) > > 2) Pi, as "e" ~ 2.71828182..., is a **trascendental** irrational > number (!). I let you guess what kind of coefficients you have to use > to generate integers. > You seem to be focused on generating N. If that's the goal, then using negative (or any base less than 2) or irrational bases is indeed problematical. However, that doesn't change the fact that a string in some base has a single, fixed value even for negative and transcendental bases. As such, they can be safely used to represent numbers, and make a perfectly valid base. Ok, maybe I exaggerated a little. The v7 version of dc interpreted an output base of 0 as base one, using the the bell character for output. I note with some sense of loss that the GNU dc/bc pair limits 2 <= ibase <= 16, and 2 <= obase. http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message